From 44ff95778485172d9714944cb8ed70159af1385e Mon Sep 17 00:00:00 2001 From: Bastiaan van der Plaat Date: Wed, 20 Dec 2023 18:16:55 +0100 Subject: [PATCH] LibWeb: Make -webkit-appearance an alias for the appearance css property --- .../LibWeb/Text/expected/css/getComputedStyle-print-all.txt | 1 + Userland/Libraries/LibWeb/CSS/Properties.json | 6 ++++++ Userland/Libraries/LibWeb/CSS/StyleComputer.cpp | 2 ++ 3 files changed, 9 insertions(+) diff --git a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt index 4f5de34d69..00b3bb2b54 100644 --- a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt +++ b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt @@ -1,3 +1,4 @@ +-webkit-appearance: auto accent-color: auto align-content: stretch align-items: normal diff --git a/Userland/Libraries/LibWeb/CSS/Properties.json b/Userland/Libraries/LibWeb/CSS/Properties.json index 6c5c98eb0f..4f8f3fed7d 100644 --- a/Userland/Libraries/LibWeb/CSS/Properties.json +++ b/Userland/Libraries/LibWeb/CSS/Properties.json @@ -1,4 +1,10 @@ { + "-webkit-appearance": { + "logical-alias-for": [ + "appearance" + ], + "max-values": 1 + }, "accent-color": { "inherited": true, "initial": "auto", diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index 8dcb2a31fa..80868ef3bf 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -395,6 +395,8 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope return PropertyID::Left; case PropertyID::InsetInlineEnd: return PropertyID::Right; + case PropertyID::WebkitAppearance: + return PropertyID::Appearance; default: return {}; }