mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +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
Notes:
sideshowbarker
2024-07-17 03:51:15 +09:00
Author: https://github.com/alimpfard
Commit: b7e3a68bfc
Pull-request: https://github.com/SerenityOS/serenity/pull/19050
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/Lubrsi
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