1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 19:15:09 +00:00

LibWeb: Put final foreground/background colors in LayoutStyle

This way we don't have to look them up in the CSS::StyleProperties
every time we want to paint with them.
This commit is contained in:
Andreas Kling 2020-12-15 16:13:05 +01:00
parent 78a51933ad
commit c630ae517e
7 changed files with 22 additions and 21 deletions

View file

@ -247,6 +247,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
if (text_transform.has_value())
style.set_text_transform(text_transform.value());
style.set_color(specified_style.color_or_fallback(CSS::PropertyID::Color, document(), Color::Transparent));
style.set_background_color(specified_style.color_or_fallback(CSS::PropertyID::BackgroundColor, document(), Color::Transparent));
style.set_z_index(specified_style.z_index());
style.set_width(specified_style.length_or_fallback(CSS::PropertyID::Width, {}));
style.set_min_width(specified_style.length_or_fallback(CSS::PropertyID::MinWidth, {}));