mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 13:39:25 +00:00
LibWeb: Store BorderRadiusStyleValue
sub-values directly
Storing these within LengthPercentage is unnecessary
This commit is contained in:
parent
2ebf446cbf
commit
25192d3c20
Notes:
github-actions[bot]
2025-10-07 09:51:15 +00:00
Author: https://github.com/Calme1709
Commit: 25192d3c20
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6375
Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 47 additions and 61 deletions
|
@ -546,29 +546,29 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
|||
if (border_bottom_left_radius.is_border_radius()) {
|
||||
computed_values.set_border_bottom_left_radius(
|
||||
CSS::BorderRadiusData {
|
||||
border_bottom_left_radius.as_border_radius().horizontal_radius(),
|
||||
border_bottom_left_radius.as_border_radius().vertical_radius() });
|
||||
CSS::LengthPercentage::from_style_value(border_bottom_left_radius.as_border_radius().horizontal_radius()),
|
||||
CSS::LengthPercentage::from_style_value(border_bottom_left_radius.as_border_radius().vertical_radius()) });
|
||||
}
|
||||
auto const& border_bottom_right_radius = computed_style.property(CSS::PropertyID::BorderBottomRightRadius);
|
||||
if (border_bottom_right_radius.is_border_radius()) {
|
||||
computed_values.set_border_bottom_right_radius(
|
||||
CSS::BorderRadiusData {
|
||||
border_bottom_right_radius.as_border_radius().horizontal_radius(),
|
||||
border_bottom_right_radius.as_border_radius().vertical_radius() });
|
||||
CSS::LengthPercentage::from_style_value(border_bottom_right_radius.as_border_radius().horizontal_radius()),
|
||||
CSS::LengthPercentage::from_style_value(border_bottom_right_radius.as_border_radius().vertical_radius()) });
|
||||
}
|
||||
auto const& border_top_left_radius = computed_style.property(CSS::PropertyID::BorderTopLeftRadius);
|
||||
if (border_top_left_radius.is_border_radius()) {
|
||||
computed_values.set_border_top_left_radius(
|
||||
CSS::BorderRadiusData {
|
||||
border_top_left_radius.as_border_radius().horizontal_radius(),
|
||||
border_top_left_radius.as_border_radius().vertical_radius() });
|
||||
CSS::LengthPercentage::from_style_value(border_top_left_radius.as_border_radius().horizontal_radius()),
|
||||
CSS::LengthPercentage::from_style_value(border_top_left_radius.as_border_radius().vertical_radius()) });
|
||||
}
|
||||
auto const& border_top_right_radius = computed_style.property(CSS::PropertyID::BorderTopRightRadius);
|
||||
if (border_top_right_radius.is_border_radius()) {
|
||||
computed_values.set_border_top_right_radius(
|
||||
CSS::BorderRadiusData {
|
||||
border_top_right_radius.as_border_radius().horizontal_radius(),
|
||||
border_top_right_radius.as_border_radius().vertical_radius() });
|
||||
CSS::LengthPercentage::from_style_value(border_top_right_radius.as_border_radius().horizontal_radius()),
|
||||
CSS::LengthPercentage::from_style_value(border_top_right_radius.as_border_radius().vertical_radius()) });
|
||||
}
|
||||
computed_values.set_display(computed_style.display());
|
||||
computed_values.set_display_before_box_type_transformation(computed_style.display_before_box_type_transformation());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue