diff --git a/Libraries/LibWeb/CSS/ComputedProperties.cpp b/Libraries/LibWeb/CSS/ComputedProperties.cpp index 61887f283a8..ee30d080b80 100644 --- a/Libraries/LibWeb/CSS/ComputedProperties.cpp +++ b/Libraries/LibWeb/CSS/ComputedProperties.cpp @@ -1602,12 +1602,8 @@ MixBlendMode ComputedProperties::mix_blend_mode() const Optional ComputedProperties::view_transition_name() const { auto const& value = property(PropertyID::ViewTransitionName); - if (value.is_custom_ident()) { - auto ident = value.as_custom_ident().custom_ident(); - if (ident == "none"_fly_string) - return {}; - return ident; - } + if (value.is_custom_ident()) + return value.as_custom_ident().custom_ident(); return {}; } diff --git a/Libraries/LibWeb/CSS/Parser/Parser.h b/Libraries/LibWeb/CSS/Parser/Parser.h index 3575992fc33..ea7bb17aad6 100644 --- a/Libraries/LibWeb/CSS/Parser/Parser.h +++ b/Libraries/LibWeb/CSS/Parser/Parser.h @@ -404,7 +404,6 @@ private: RefPtr parse_transition_value(TokenStream&); RefPtr parse_translate_value(TokenStream&); RefPtr parse_scale_value(TokenStream&); - RefPtr parse_view_transition_name_value(TokenStream&); RefPtr parse_grid_track_size_list(TokenStream&, bool allow_separate_line_name_blocks = false); RefPtr parse_grid_auto_track_sizes(TokenStream&); RefPtr parse_grid_auto_flow_value(TokenStream&); diff --git a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp index c52072482e1..4967c54bdf4 100644 --- a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp +++ b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp @@ -158,7 +158,7 @@ Optional Parser::parse_css_value_for_properties(Readon // Custom idents if (auto property = any_property_accepts_type(property_ids, ValueType::CustomIdent); property.has_value()) { auto context_guard = push_temporary_value_parsing_context(*property); - if (auto custom_ident = parse_custom_ident_value(tokens, {})) + if (auto custom_ident = parse_custom_ident_value(tokens, property_custom_ident_blacklist(*property))) return PropertyAndValue { *property, custom_ident }; } } @@ -714,10 +714,6 @@ Parser::ParseErrorOr> Parser::parse_css_value(Prope if (auto parsed_value = parse_scale_value(tokens); parsed_value && !tokens.has_next_token()) return parsed_value.release_nonnull(); return ParseError::SyntaxError; - case PropertyID::ViewTransitionName: - if (auto parsed_value = parse_view_transition_name_value(tokens); parsed_value && !tokens.has_next_token()) - return parsed_value.release_nonnull(); - return ParseError::SyntaxError; default: break; } @@ -4443,29 +4439,4 @@ RefPtr Parser::parse_filter_value_list_value(TokenStream Parser::parse_view_transition_name_value(TokenStream& tokens) -{ - // none | - tokens.discard_whitespace(); - { - auto transaction = tokens.begin_transaction(); - - // The values 'none' and 'auto' are excluded from here. - // Note: Only auto is excluded here since none isn't parsed differently. - auto ident = parse_custom_ident_value(tokens, { { "auto"sv } }); - if (!ident) - return {}; - - tokens.discard_whitespace(); - transaction.commit(); - - if (Infra::is_ascii_case_insensitive_match(ident->custom_ident().to_string(), "none"sv)) { - return CustomIdentStyleValue::create("none"_fly_string); - } else { - return ident; - } - } - return {}; -} - }