1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 14:35:07 +00:00

LibWeb: Move the offset, margin and padding boxes into LayoutStyle

This commit is contained in:
Andreas Kling 2020-06-24 17:45:42 +02:00
parent 6b334e02e6
commit 4b2ac34725
9 changed files with 66 additions and 79 deletions

View file

@ -237,6 +237,10 @@ void LayoutNodeWithStyle::apply_style(const StyleProperties& specified_style)
style.set_height(specified_style.length_or_fallback(CSS::PropertyID::Height, {}));
style.set_min_height(specified_style.length_or_fallback(CSS::PropertyID::MinHeight, {}));
style.set_max_height(specified_style.length_or_fallback(CSS::PropertyID::MaxHeight, {}));
style.set_offset(specified_style.length_box(CSS::PropertyID::Left, CSS::PropertyID::Top, CSS::PropertyID::Right, CSS::PropertyID::Bottom));
style.set_margin(specified_style.length_box(CSS::PropertyID::MarginLeft, CSS::PropertyID::MarginTop, CSS::PropertyID::MarginRight, CSS::PropertyID::MarginBottom));
style.set_padding(specified_style.length_box(CSS::PropertyID::PaddingLeft, CSS::PropertyID::PaddingTop, CSS::PropertyID::PaddingRight, CSS::PropertyID::PaddingBottom));
}
}