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
commit 4b2ac34725
Notes: sideshowbarker 2024-07-19 05:24:23 +09:00
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));
}
}