diff options
author | Tobias Christiansen <tobi@tobyase.de> | 2021-05-14 22:31:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-20 22:08:02 +0200 |
commit | 499934a84860dc9447ba65997cc9d83f53353be6 (patch) | |
tree | 020866d8f985f12c7863f3ded8f95b9d094f1e54 /Userland/Libraries/LibWeb/Layout/Node.cpp | |
parent | 0c261a1c959907666aa21a92e52e14a261b1c763 (diff) | |
download | serenity-499934a84860dc9447ba65997cc9d83f53353be6.zip |
LibWeb: Make border-radius attibutes accessible
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/Node.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/Node.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp index 1c5e2a0dab..533c747ffd 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.cpp +++ b/Userland/Libraries/LibWeb/Layout/Node.cpp @@ -226,6 +226,22 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style) m_background_image = static_ptr_cast<CSS::ImageStyleValue>(bgimage.value()); } + auto border_bottom_left_radius = specified_style.property(CSS::PropertyID::BorderBottomLeftRadius); + if (border_bottom_left_radius.has_value()) + computed_values.set_border_bottom_left_radius(border_bottom_left_radius.value()->to_length()); + + auto border_bottom_right_radius = specified_style.property(CSS::PropertyID::BorderBottomRightRadius); + if (border_bottom_right_radius.has_value()) + computed_values.set_border_bottom_right_radius(border_bottom_right_radius.value()->to_length()); + + auto border_top_left_radius = specified_style.property(CSS::PropertyID::BorderTopLeftRadius); + if (border_top_left_radius.has_value()) + computed_values.set_border_top_left_radius(border_top_left_radius.value()->to_length()); + + auto border_top_right_radius = specified_style.property(CSS::PropertyID::BorderTopRightRadius); + if (border_top_right_radius.has_value()) + computed_values.set_border_top_right_radius(border_top_right_radius.value()->to_length()); + auto background_repeat_x = specified_style.background_repeat_x(); if (background_repeat_x.has_value()) computed_values.set_background_repeat_x(background_repeat_x.value()); |