LibWeb: Store BackgroundSizeStyleValue sub-values directly

Storing these within LengthPercentage is unnecessary
This commit is contained in:
Callum Law 2025-10-02 16:50:43 +13:00 committed by Sam Atkins
commit 2ebf446cbf
Notes: github-actions[bot] 2025-10-07 09:51:23 +00:00
5 changed files with 21 additions and 52 deletions

View file

@ -492,8 +492,8 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
if (size_value->is_background_size()) {
auto& size = size_value->as_background_size();
layer.size_type = CSS::BackgroundSize::LengthPercentage;
layer.size_x = size.size_x();
layer.size_y = size.size_y();
layer.size_x = CSS::LengthPercentageOrAuto::from_style_value(size.size_x());
layer.size_y = CSS::LengthPercentageOrAuto::from_style_value(size.size_y());
} else if (size_value->is_keyword()) {
switch (size_value->to_keyword()) {
case CSS::Keyword::Contain: