1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 09:37:44 +00:00

LibWeb: Implement and use BorderRadiusStyleValue

This parses the elliptical border-radius values, though currently we
only support circular ones. So, to_length() is overloaded to return the
horizontal-radius. This means the code in Layout/Node.cpp does not need
to change for now.
This commit is contained in:
Sam Atkins 2021-08-06 16:55:08 +01:00 committed by Andreas Kling
parent e3cbd366c7
commit 168865dbdc
5 changed files with 159 additions and 45 deletions

View file

@ -233,6 +233,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
m_background_image = static_ptr_cast<CSS::ImageStyleValue>(bgimage.value());
}
// FIXME: BorderXRadius properties are now BorderRadiusStyleValues, so make use of that.
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());