From 499934a84860dc9447ba65997cc9d83f53353be6 Mon Sep 17 00:00:00 2001 From: Tobias Christiansen Date: Fri, 14 May 2021 22:31:03 +0200 Subject: LibWeb: Make border-radius attibutes accessible --- Userland/Libraries/LibWeb/Layout/Node.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Userland/Libraries/LibWeb/Layout') 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(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()); -- cgit v1.2.3