mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	LibWeb: Parse rect style value
Add ability to parse a rect when it is used as the value of a style property.
This commit is contained in:
		
							parent
							
								
									4d1ceaaa43
								
							
						
					
					
						commit
						b4dd477644
					
				
					 7 changed files with 117 additions and 0 deletions
				
			
		|  | @ -501,6 +501,11 @@ bool property_accepts_value(PropertyID property_id, StyleValue& style_value) | |||
|                             output_numeric_value_check(property_generator, "has_number"sv, "to_number()"sv, Array { "Integer"sv, "Number"sv }, min_value, max_value); | ||||
|                         } else if (type_name == "percentage") { | ||||
|                             output_numeric_value_check(property_generator, "is_percentage"sv, "as_percentage().percentage().value()"sv, Array { "Percentage"sv }, min_value, max_value); | ||||
|                         } else if (type_name == "rect") { | ||||
|                             property_generator.append(R"~~~( | ||||
|         if (style_value.has_rect()) | ||||
|             return true; | ||||
| )~~~"); | ||||
|                         } else if (type_name == "resolution") { | ||||
|                             output_numeric_value_check(property_generator, "is_resolution"sv, "as_resolution().resolution().to_dots_per_pixel()"sv, Array<StringView, 0> {}, min_value, max_value); | ||||
|                         } else if (type_name == "string") { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tom
						Tom