summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-11-10 13:47:09 +0000
committerAndreas Kling <kling@serenityos.org>2021-11-10 21:58:14 +0100
commit63aa39987380cefd26624891eb359ddbc4d15472 (patch)
treeb361e3957def6e5bcf3295648d1b19385b528ce2 /Userland/Libraries
parent11f0ece58f28cd588119cf2264d0d6600498927e (diff)
downloadserenity-63aa39987380cefd26624891eb359ddbc4d15472.zip
LibWeb: Allow `none` value for `transform` property
This is the initial value for `transform`. We already handle the value later, we just were not parsing it.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index b370c7da8e..314660fbdf 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -3438,6 +3438,12 @@ RefPtr<StyleValue> Parser::parse_transform_value(ParsingContext const& context,
NonnullRefPtrVector<StyleValue> transformations;
for (auto& part : component_values) {
+ if (part.is(Token::Type::Ident) && part.token().ident().equals_ignoring_case("none")) {
+ if (!transformations.is_empty())
+ return nullptr;
+ return IdentifierStyleValue::create(ValueID::None);
+ }
+
if (!part.is_function())
return nullptr;
auto maybe_function = parse_transform_function_name(part.function().name());