mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:12:44 +00:00 
			
		
		
		
	LibWeb: Switch to using AK::is and AK::downcast
This commit is contained in:
		
							parent
							
								
									fe6474e692
								
							
						
					
					
						commit
						71556e39a4
					
				
					 73 changed files with 249 additions and 433 deletions
				
			
		|  | @ -63,15 +63,13 @@ protected: | |||
| 
 | ||||
| } | ||||
| 
 | ||||
| namespace Web { | ||||
| 
 | ||||
| template<> | ||||
| inline bool is<SVG::SVGGraphicsElement>(const Node& node) | ||||
| AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGGraphicsElement) | ||||
| static bool is_type(const Web::Node& node) | ||||
| { | ||||
|     if (!is<Element>(node)) | ||||
|     if (!is<Web::Element>(node)) | ||||
|         return false; | ||||
| 
 | ||||
|     auto tag_name = to<Element>(node).tag_name(); | ||||
|     auto tag_name = downcast<Web::Element>(node).tag_name(); | ||||
| 
 | ||||
| #define __ENUMERATE_SVG_TAG(name) \ | ||||
|     if (tag_name == #name)        \ | ||||
|  | @ -81,5 +79,4 @@ inline bool is<SVG::SVGGraphicsElement>(const Node& node) | |||
| 
 | ||||
|     return false; | ||||
| } | ||||
| 
 | ||||
| } | ||||
| AK_END_TYPE_TRAITS() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling