diff options
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index b7a9e95f22..aec3bf250f 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -4772,13 +4772,19 @@ RefPtr<StyleValue> Parser::parse_text_decoration_line_value(TokenStream<Componen RefPtr<StyleValue> Parser::parse_transform_value(Vector<ComponentValue> const& component_values) { NonnullRefPtrVector<StyleValue> transformations; + auto tokens = TokenStream { component_values }; + tokens.skip_whitespace(); + + while (tokens.has_next_token()) { + tokens.skip_whitespace(); + auto& part = tokens.next_token(); - for (auto& part : component_values) { - if (part.is(Token::Type::Whitespace)) - continue; if (part.is(Token::Type::Ident) && part.token().ident().equals_ignoring_case("none")) { if (!transformations.is_empty()) return nullptr; + tokens.skip_whitespace(); + if (tokens.has_next_token()) + return nullptr; return IdentifierStyleValue::create(ValueID::None); } |