mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
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.
This commit is contained in:
parent
93a502e053
commit
d0fcce8205
1 changed files with 8 additions and 8 deletions
|
@ -945,20 +945,20 @@ RefPtr<CSSStyleValue const> CSSStyleProperties::style_value_for_computed_propert
|
||||||
// The resolved value is the computed value.
|
// The resolved value is the computed value.
|
||||||
// NOTE: This is handled inside the `default` case.
|
// NOTE: This is handled inside the `default` case.
|
||||||
case PropertyID::BorderBottomWidth: {
|
case PropertyID::BorderBottomWidth: {
|
||||||
auto border_bottom_width = layout_node.computed_values().border_bottom();
|
auto border_bottom_width = layout_node.computed_values().border_bottom().width;
|
||||||
return LengthStyleValue::create(Length::make_px(border_bottom_width.width));
|
return LengthStyleValue::create(Length::make_px(border_bottom_width));
|
||||||
}
|
}
|
||||||
case PropertyID::BorderLeftWidth: {
|
case PropertyID::BorderLeftWidth: {
|
||||||
auto border_left_width = layout_node.computed_values().border_left();
|
auto border_left_width = layout_node.computed_values().border_left().width;
|
||||||
return LengthStyleValue::create(Length::make_px(border_left_width.width));
|
return LengthStyleValue::create(Length::make_px(border_left_width));
|
||||||
}
|
}
|
||||||
case PropertyID::BorderRightWidth: {
|
case PropertyID::BorderRightWidth: {
|
||||||
auto border_right_width = layout_node.computed_values().border_right();
|
auto border_right_width = layout_node.computed_values().border_right().width;
|
||||||
return LengthStyleValue::create(Length::make_px(border_right_width.width));
|
return LengthStyleValue::create(Length::make_px(border_right_width));
|
||||||
}
|
}
|
||||||
case PropertyID::BorderTopWidth: {
|
case PropertyID::BorderTopWidth: {
|
||||||
auto border_top_width = layout_node.computed_values().border_top();
|
auto border_top_width = layout_node.computed_values().border_top().width;
|
||||||
return LengthStyleValue::create(Length::make_px(border_top_width.width));
|
return LengthStyleValue::create(Length::make_px(border_top_width));
|
||||||
}
|
}
|
||||||
case PropertyID::OutlineWidth: {
|
case PropertyID::OutlineWidth: {
|
||||||
auto outline_width = layout_node.computed_values().outline_width();
|
auto outline_width = layout_node.computed_values().outline_width();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue