diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index ffdbb78f8c..9a5b7a0ff6 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -1965,18 +1965,16 @@ Optional Parser::parse_a_declaration(TokenStream& token return {}; } -Vector Parser::parse_as_list_of_declarations() -{ - return parse_a_list_of_declarations(m_token_stream); -} - // 5.3.8. Parse a list of declarations // https://www.w3.org/TR/css-syntax-3/#parse-list-of-declarations template Vector Parser::parse_a_list_of_declarations(TokenStream& tokens) { // To parse a list of declarations from input: + // 1. Normalize input, and set input to the result. + // Note: This is done when initializing the Parser. + // 2. Consume a list of declarations from input, and return the result. return consume_a_list_of_declarations(tokens); } diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h index b06f42022d..457d2bd3f4 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h @@ -89,8 +89,6 @@ public: Parser(ParsingContext const&, StringView input, String const& encoding = "utf-8"); ~Parser() = default; - // For the contents of a style attribute, which parses text into the contents of a single style rule. - Vector parse_as_list_of_declarations(); // For things that need to consume a single value, like the parsing rules for attr(). Optional parse_as_component_value(); // For the contents of presentational attributes, which parse text into a single declaration’s value, or for parsing a stand-alone selector [SELECT] or list of Media Queries [MEDIAQ], as in Selectors API or the media HTML attribute. @@ -148,6 +146,8 @@ private: // "Parse a declaration" is used in @supports conditions. [CSS3-CONDITIONAL] template Optional parse_a_declaration(TokenStream&); + + // "Parse a list of declarations" is for the contents of a style attribute, which parses text into the contents of a single style rule. template Vector parse_a_list_of_declarations(TokenStream&); template