diff --git a/Tests/LibWeb/Text/expected/WebAnimations/transitions/parse-transition-property.txt b/Tests/LibWeb/Text/expected/WebAnimations/transitions/parse-transition-property.txt
new file mode 100644
index 00000000000..25958bd018a
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/WebAnimations/transitions/parse-transition-property.txt
@@ -0,0 +1 @@
+ PASS! (Did not crash/timeout)
diff --git a/Tests/LibWeb/Text/input/WebAnimations/transitions/parse-transition-property.html b/Tests/LibWeb/Text/input/WebAnimations/transitions/parse-transition-property.html
new file mode 100644
index 00000000000..ea665aafc6e
--- /dev/null
+++ b/Tests/LibWeb/Text/input/WebAnimations/transitions/parse-transition-property.html
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index 683313108bb..c1dc3344df5 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -5367,6 +5367,16 @@ RefPtr Parser::parse_transition_value(TokenStream& t
continue;
}
+ if (auto easing = parse_easing_value(tokens)) {
+ if (transition.easing) {
+ dbgln_if(CSS_PARSER_DEBUG, "Transition property has multiple easing values");
+ return {};
+ }
+
+ transition.easing = easing->as_easing();
+ continue;
+ }
+
if (tokens.peek_token().is(Token::Type::Ident)) {
if (transition.property_name) {
dbgln_if(CSS_PARSER_DEBUG, "Transition property has multiple property identifiers");
@@ -5376,16 +5386,12 @@ RefPtr Parser::parse_transition_value(TokenStream& t
auto ident = tokens.next_token().token().ident();
if (auto property = property_id_from_string(ident); property.has_value())
transition.property_name = CustomIdentStyleValue::create(ident);
+
+ continue;
}
- if (auto easing = parse_easing_value(tokens)) {
- if (transition.easing) {
- dbgln_if(CSS_PARSER_DEBUG, "Transition property has multiple easing values");
- return {};
- }
-
- transition.easing = easing->as_easing();
- }
+ dbgln_if(CSS_PARSER_DEBUG, "Transition property has unexpected token \"{}\"", tokens.peek_token().to_string());
+ return {};
}
if (!transition.property_name)