@@ -3316,10 +3316,8 @@ RefPtr<StyleValue> Parser::parse_border_radius_shorthand_value(TokenStream<Compo
3316
3316
{ move (top_left_radius), move (top_right_radius), move (bottom_right_radius), move (bottom_left_radius) });
3317
3317
}
3318
3318
3319
- RefPtr<StyleValue> Parser::parse_shadow_value (Vector <ComponentValue> const & component_values , AllowInsetKeyword allow_inset_keyword)
3319
+ RefPtr<StyleValue> Parser::parse_shadow_value (TokenStream <ComponentValue>& tokens , AllowInsetKeyword allow_inset_keyword)
3320
3320
{
3321
- TokenStream tokens { component_values };
3322
-
3323
3321
// "none"
3324
3322
if (contains_single_none_ident (tokens))
3325
3323
return parse_identifier_value (tokens.next_token ());
@@ -5792,7 +5790,7 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> Parser::parse_css_value(Property
5792
5790
return parsed_value.release_nonnull ();
5793
5791
return ParseError::SyntaxError;
5794
5792
case PropertyID::BoxShadow:
5795
- if (auto parsed_value = parse_shadow_value (component_values , AllowInsetKeyword::Yes))
5793
+ if (auto parsed_value = parse_shadow_value (tokens , AllowInsetKeyword::Yes); parsed_value && !tokens. has_next_token ( ))
5796
5794
return parsed_value.release_nonnull ();
5797
5795
return ParseError::SyntaxError;
5798
5796
case PropertyID::Content:
@@ -5920,7 +5918,7 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> Parser::parse_css_value(Property
5920
5918
return ParseError::SyntaxError;
5921
5919
}
5922
5920
case PropertyID::TextShadow:
5923
- if (auto parsed_value = parse_shadow_value (component_values , AllowInsetKeyword::No))
5921
+ if (auto parsed_value = parse_shadow_value (tokens , AllowInsetKeyword::No); parsed_value && !tokens. has_next_token ( ))
5924
5922
return parsed_value.release_nonnull ();
5925
5923
return ParseError::SyntaxError;
5926
5924
case PropertyID::Transform:
0 commit comments