From 66300794a649d1c03d393d17abefb49529ad54b0 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 20 Sep 2023 12:50:15 +0100 Subject: [PATCH] LibWeb: Expand CSS builtin values in border shorthands --- .../Libraries/LibWeb/CSS/StyleComputer.cpp | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index cf2ff309974..581b35fa18d 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -587,6 +587,30 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope } return; } + if (property_id == CSS::PropertyID::BorderTop) { + set_longhand_property(PropertyID::BorderTopWidth, value); + set_longhand_property(PropertyID::BorderTopStyle, value); + set_longhand_property(PropertyID::BorderTopColor, value); + return; + } + if (property_id == CSS::PropertyID::BorderRight) { + set_longhand_property(PropertyID::BorderRightWidth, value); + set_longhand_property(PropertyID::BorderRightStyle, value); + set_longhand_property(PropertyID::BorderRightColor, value); + return; + } + if (property_id == CSS::PropertyID::BorderBottom) { + set_longhand_property(PropertyID::BorderBottomWidth, value); + set_longhand_property(PropertyID::BorderBottomStyle, value); + set_longhand_property(PropertyID::BorderBottomColor, value); + return; + } + if (property_id == CSS::PropertyID::BorderLeft) { + set_longhand_property(PropertyID::BorderLeftWidth, value); + set_longhand_property(PropertyID::BorderLeftStyle, value); + set_longhand_property(PropertyID::BorderLeftColor, value); + return + } return; }