mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:22:45 +00:00 
			
		
		
		
	LibWeb: Keep track of CSS property source declarations
This allows us to figure out where a specific CSS property comes from, which is going to be used in a future commit to uniquely identify running animations.
This commit is contained in:
		
							parent
							
								
									279924242d
								
							
						
					
					
						commit
						b7e3a68bfc
					
				
					 5 changed files with 223 additions and 210 deletions
				
			
		|  | @ -37,15 +37,15 @@ void HTMLBodyElement::apply_presentational_hints(CSS::StyleProperties& style) co | |||
|             // https://html.spec.whatwg.org/multipage/rendering.html#the-page:rules-for-parsing-a-legacy-colour-value
 | ||||
|             auto color = parse_legacy_color_value(value); | ||||
|             if (color.has_value()) | ||||
|                 style.set_property(CSS::PropertyID::BackgroundColor, CSS::ColorStyleValue::create(color.value()).release_value_but_fixme_should_propagate_errors()); | ||||
|                 style.set_property(CSS::PropertyID::BackgroundColor, CSS::ColorStyleValue::create(color.value()).release_value_but_fixme_should_propagate_errors(), nullptr); | ||||
|         } else if (name.equals_ignoring_ascii_case("text"sv)) { | ||||
|             // https://html.spec.whatwg.org/multipage/rendering.html#the-page:rules-for-parsing-a-legacy-colour-value-2
 | ||||
|             auto color = parse_legacy_color_value(value); | ||||
|             if (color.has_value()) | ||||
|                 style.set_property(CSS::PropertyID::Color, CSS::ColorStyleValue::create(color.value()).release_value_but_fixme_should_propagate_errors()); | ||||
|                 style.set_property(CSS::PropertyID::Color, CSS::ColorStyleValue::create(color.value()).release_value_but_fixme_should_propagate_errors(), nullptr); | ||||
|         } else if (name.equals_ignoring_ascii_case("background"sv)) { | ||||
|             VERIFY(m_background_style_value); | ||||
|             style.set_property(CSS::PropertyID::BackgroundImage, *m_background_style_value); | ||||
|             style.set_property(CSS::PropertyID::BackgroundImage, *m_background_style_value, nullptr); | ||||
|         } | ||||
|     }); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ali Mohammad Pur
						Ali Mohammad Pur