mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:12:43 +00:00 
			
		
		
		
	LibWeb: Use HTML::AttributeNames::foo instead of FlyString("foo")
To avoid the costly instantiation of FlyStrings whenever we're looking up attributes, use the premade HTML::AttributeNames globals. :^)
This commit is contained in:
		
							parent
							
								
									ff55d00261
								
							
						
					
					
						commit
						2149820260
					
				
					 16 changed files with 71 additions and 43 deletions
				
			
		|  | @ -316,7 +316,7 @@ Vector<const Element*> Document::get_elements_by_name(const String& name) const | |||
| { | ||||
|     Vector<const Element*> elements; | ||||
|     for_each_in_subtree_of_type<Element>([&](auto& element) { | ||||
|         if (element.attribute("name") == name) | ||||
|         if (element.attribute(HTML::AttributeNames::name) == name) | ||||
|             elements.append(&element); | ||||
|         return IterationDecision::Continue; | ||||
|     }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling