| 
									
										
										
										
											2019-06-27 17:47:59 +02:00
										 |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <AK/NonnullRefPtrVector.h>
 | 
					
						
							| 
									
										
										
										
											2019-09-21 15:32:17 +03:00
										 |  |  | #include <AK/OwnPtr.h>
 | 
					
						
							|  |  |  | #include <LibHTML/CSS/StyleProperties.h>
 | 
					
						
							| 
									
										
										
										
											2019-06-27 17:47:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | class Document; | 
					
						
							|  |  |  | class Element; | 
					
						
							| 
									
										
										
										
											2019-06-28 21:17:34 +02:00
										 |  |  | class ParentNode; | 
					
						
							| 
									
										
										
										
											2019-06-27 20:40:21 +02:00
										 |  |  | class StyleRule; | 
					
						
							| 
									
										
										
										
											2019-06-27 17:47:59 +02:00
										 |  |  | class StyleSheet; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class StyleResolver { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     explicit StyleResolver(Document&); | 
					
						
							|  |  |  |     ~StyleResolver(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Document& document() { return m_document; } | 
					
						
							|  |  |  |     const Document& document() const { return m_document; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-07 09:23:53 +02:00
										 |  |  |     NonnullRefPtr<StyleProperties> resolve_style(const Element&, const StyleProperties* parent_style) const; | 
					
						
							| 
									
										
										
										
											2019-06-27 17:47:59 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-27 20:40:21 +02:00
										 |  |  |     NonnullRefPtrVector<StyleRule> collect_matching_rules(const Element&) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-08 15:34:19 +02:00
										 |  |  |     static bool is_inherited_property(CSS::PropertyID); | 
					
						
							| 
									
										
										
										
											2019-10-05 23:47:06 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-27 17:47:59 +02:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2019-10-05 09:01:12 +02:00
										 |  |  |     template<typename Callback> | 
					
						
							|  |  |  |     void for_each_stylesheet(Callback) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-27 17:47:59 +02:00
										 |  |  |     Document& m_document; | 
					
						
							|  |  |  | }; |