mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 15:32:51 +00:00
LibWeb: Parse all
transition-property value as keyword
We were previously parsing this value, as a custom-ident, meaning that the code path for handling the `all` case wasn't being followed.
This commit is contained in:
parent
ac1c2a956a
commit
8a398e7a88
Notes:
github-actions[bot]
2025-04-27 08:49:59 +00:00
Author: https://github.com/tcl3
Commit: 8a398e7a88
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4490
Reviewed-by: https://github.com/AtkinsSJ ✅
11 changed files with 362 additions and 359 deletions
|
@ -3829,11 +3829,15 @@ RefPtr<CSSStyleValue const> Parser::parse_transition_property_value(TokenStream<
|
|||
StyleValueVector transition_properties;
|
||||
for (auto const& value : transition_property_values) {
|
||||
TokenStream transition_property_tokens { value };
|
||||
auto custom_ident = parse_custom_ident_value(transition_property_tokens, { { "none"sv } });
|
||||
if (!custom_ident || transition_property_tokens.has_next_token())
|
||||
return nullptr;
|
||||
if (auto all_keyword_value = parse_all_as_single_keyword_value(transition_property_tokens, Keyword::All)) {
|
||||
transition_properties.append(*all_keyword_value);
|
||||
} else {
|
||||
auto custom_ident = parse_custom_ident_value(transition_property_tokens, { { "all"sv, "none"sv } });
|
||||
if (!custom_ident || transition_property_tokens.has_next_token())
|
||||
return nullptr;
|
||||
|
||||
transition_properties.append(custom_ident.release_nonnull());
|
||||
transition_properties.append(custom_ident.release_nonnull());
|
||||
}
|
||||
}
|
||||
transaction.commit();
|
||||
return StyleValueList::create(move(transition_properties), StyleValueList::Separator::Comma);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue