diff options
author | MacDue <macdue@dueutil.tech> | 2022-06-12 15:05:47 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-06-13 09:43:45 +0100 |
commit | 28c78b45ca86291b10318a0546ad6526a9c572e7 (patch) | |
tree | 4ee0084b749d6a67cd68d1dd024a6561614ac0d3 /Userland/Libraries/LibWeb/Layout/Node.cpp | |
parent | 2366a734740b4c25d3869a03ad18445006e576fa (diff) | |
download | serenity-28c78b45ca86291b10318a0546ad6526a9c572e7.zip |
LibWeb: Keep both horizontal and vertical border radii till painting
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/Node.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/Node.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp index 86ed73a1d0..f128662bf3 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.cpp +++ b/Userland/Libraries/LibWeb/Layout/Node.cpp @@ -368,21 +368,33 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style) // FIXME: BorderXRadius properties are now BorderRadiusStyleValues, so make use of that. auto border_bottom_left_radius = computed_style.property(CSS::PropertyID::BorderBottomLeftRadius); - if (border_bottom_left_radius->is_border_radius()) - computed_values.set_border_bottom_left_radius(border_bottom_left_radius->as_border_radius().horizontal_radius()); - + 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() }); + } auto 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(border_bottom_right_radius->as_border_radius().horizontal_radius()); - + 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() }); + } auto 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(border_top_left_radius->as_border_radius().horizontal_radius()); - + 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() }); + } auto 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(border_top_right_radius->as_border_radius().horizontal_radius()); - + 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() }); + } computed_values.set_display(computed_style.display()); auto flex_direction = computed_style.flex_direction(); |