1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 15:17:45 +00:00

LibWeb: Spec-comment parse_a_list_of_declarations()

The `parse_as_list_of_declarations()` public method is unused and will
not be used by any user code so has been removed.
This commit is contained in:
Sam Atkins 2022-03-30 12:23:07 +01:00 committed by Andreas Kling
parent 2aac9f9258
commit bcf4254331
2 changed files with 5 additions and 7 deletions

View file

@ -1965,18 +1965,16 @@ Optional<StyleDeclarationRule> Parser::parse_a_declaration(TokenStream<T>& token
return {}; return {};
} }
Vector<DeclarationOrAtRule> Parser::parse_as_list_of_declarations()
{
return parse_a_list_of_declarations(m_token_stream);
}
// 5.3.8. Parse a list of declarations // 5.3.8. Parse a list of declarations
// https://www.w3.org/TR/css-syntax-3/#parse-list-of-declarations // https://www.w3.org/TR/css-syntax-3/#parse-list-of-declarations
template<typename T> template<typename T>
Vector<DeclarationOrAtRule> Parser::parse_a_list_of_declarations(TokenStream<T>& tokens) Vector<DeclarationOrAtRule> Parser::parse_a_list_of_declarations(TokenStream<T>& tokens)
{ {
// To parse a list of declarations from input: // To parse a list of declarations from input:
// 1. Normalize input, and set input to the result. // 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. // 2. Consume a list of declarations from input, and return the result.
return consume_a_list_of_declarations(tokens); return consume_a_list_of_declarations(tokens);
} }

View file

@ -89,8 +89,6 @@ public:
Parser(ParsingContext const&, StringView input, String const& encoding = "utf-8"); Parser(ParsingContext const&, StringView input, String const& encoding = "utf-8");
~Parser() = default; ~Parser() = default;
// For the contents of a style attribute, which parses text into the contents of a single style rule.
Vector<DeclarationOrAtRule> parse_as_list_of_declarations();
// For things that need to consume a single value, like the parsing rules for attr(). // For things that need to consume a single value, like the parsing rules for attr().
Optional<StyleComponentValueRule> parse_as_component_value(); Optional<StyleComponentValueRule> parse_as_component_value();
// For the contents of presentational attributes, which parse text into a single declarations value, or for parsing a stand-alone selector [SELECT] or list of Media Queries [MEDIAQ], as in Selectors API or the media HTML attribute. // For the contents of presentational attributes, which parse text into a single declarations 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] // "Parse a declaration" is used in @supports conditions. [CSS3-CONDITIONAL]
template<typename T> template<typename T>
Optional<StyleDeclarationRule> parse_a_declaration(TokenStream<T>&); Optional<StyleDeclarationRule> parse_a_declaration(TokenStream<T>&);
// "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<typename T> template<typename T>
Vector<DeclarationOrAtRule> parse_a_list_of_declarations(TokenStream<T>&); Vector<DeclarationOrAtRule> parse_a_list_of_declarations(TokenStream<T>&);
template<typename T> template<typename T>