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.
This commit is contained in:
Sam Atkins 2021-11-10 13:47:09 +00:00 committed by Andreas Kling
parent 11f0ece58f
commit 63aa399873
Notes: sideshowbarker 2024-07-18 01:18:30 +09:00

View file

@ -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());