From 026bc91d6c95f27b5c5818dcecd62e2b8690bcd9 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sat, 5 Apr 2025 00:19:37 +0100 Subject: [PATCH] LibWeb/CSS: Extract border width values directly There's no need to keep a copy of a `BorderData` object in this case. This makes the variable names used a bit less confusing. --- Libraries/LibWeb/CSS/CSSStyleProperties.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Libraries/LibWeb/CSS/CSSStyleProperties.cpp b/Libraries/LibWeb/CSS/CSSStyleProperties.cpp index d7a92043c56..fd9f93103b4 100644 --- a/Libraries/LibWeb/CSS/CSSStyleProperties.cpp +++ b/Libraries/LibWeb/CSS/CSSStyleProperties.cpp @@ -945,20 +945,20 @@ RefPtr CSSStyleProperties::style_value_for_computed_propert // The resolved value is the computed value. // NOTE: This is handled inside the `default` case. case PropertyID::BorderBottomWidth: { - auto border_bottom_width = layout_node.computed_values().border_bottom(); - return LengthStyleValue::create(Length::make_px(border_bottom_width.width)); + auto border_bottom_width = layout_node.computed_values().border_bottom().width; + return LengthStyleValue::create(Length::make_px(border_bottom_width)); } case PropertyID::BorderLeftWidth: { - auto border_left_width = layout_node.computed_values().border_left(); - return LengthStyleValue::create(Length::make_px(border_left_width.width)); + auto border_left_width = layout_node.computed_values().border_left().width; + return LengthStyleValue::create(Length::make_px(border_left_width)); } case PropertyID::BorderRightWidth: { - auto border_right_width = layout_node.computed_values().border_right(); - return LengthStyleValue::create(Length::make_px(border_right_width.width)); + auto border_right_width = layout_node.computed_values().border_right().width; + return LengthStyleValue::create(Length::make_px(border_right_width)); } case PropertyID::BorderTopWidth: { - auto border_top_width = layout_node.computed_values().border_top(); - return LengthStyleValue::create(Length::make_px(border_top_width.width)); + auto border_top_width = layout_node.computed_values().border_top().width; + return LengthStyleValue::create(Length::make_px(border_top_width)); } case PropertyID::OutlineWidth: { auto outline_width = layout_node.computed_values().outline_width();