summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp47
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.h16
2 files changed, 1 insertions, 62 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index 10a8e8a18a..9f4e511708 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -1111,11 +1111,6 @@ Optional<Supports::Feature> Parser::parse_supports_feature(TokenStream<StyleComp
return {};
}
-Optional<Parser::GeneralEnclosed> Parser::parse_general_enclosed()
-{
- return parse_general_enclosed(m_token_stream);
-}
-
template<typename T>
Optional<Parser::GeneralEnclosed> Parser::parse_general_enclosed(TokenStream<T>&)
{
@@ -1123,11 +1118,6 @@ Optional<Parser::GeneralEnclosed> Parser::parse_general_enclosed(TokenStream<T>&
return {};
}
-NonnullRefPtrVector<StyleRule> Parser::consume_a_list_of_rules(bool top_level)
-{
- return consume_a_list_of_rules(m_token_stream, top_level);
-}
-
template<typename T>
NonnullRefPtrVector<StyleRule> Parser::consume_a_list_of_rules(TokenStream<T>& tokens, bool top_level)
{
@@ -1174,11 +1164,6 @@ NonnullRefPtrVector<StyleRule> Parser::consume_a_list_of_rules(TokenStream<T>& t
return rules;
}
-NonnullRefPtr<StyleRule> Parser::consume_an_at_rule()
-{
- return consume_an_at_rule(m_token_stream);
-}
-
template<typename T>
NonnullRefPtr<StyleRule> Parser::consume_an_at_rule(TokenStream<T>& tokens)
{
@@ -1218,11 +1203,6 @@ NonnullRefPtr<StyleRule> Parser::consume_an_at_rule(TokenStream<T>& tokens)
}
}
-RefPtr<StyleRule> Parser::consume_a_qualified_rule()
-{
- return consume_a_qualified_rule(m_token_stream);
-}
-
template<typename T>
RefPtr<StyleRule> Parser::consume_a_qualified_rule(TokenStream<T>& tokens)
{
@@ -1277,16 +1257,6 @@ StyleComponentValueRule Parser::consume_a_component_value(TokenStream<T>& tokens
return StyleComponentValueRule(token);
}
-StyleComponentValueRule Parser::consume_a_component_value()
-{
- return consume_a_component_value(m_token_stream);
-}
-
-NonnullRefPtr<StyleBlockRule> Parser::consume_a_simple_block()
-{
- return consume_a_simple_block(m_token_stream);
-}
-
template<typename T>
NonnullRefPtr<StyleBlockRule> Parser::consume_a_simple_block(TokenStream<T>& tokens)
{
@@ -1313,11 +1283,6 @@ NonnullRefPtr<StyleBlockRule> Parser::consume_a_simple_block(TokenStream<T>& tok
}
}
-NonnullRefPtr<StyleFunctionRule> Parser::consume_a_function()
-{
- return consume_a_function(m_token_stream);
-}
-
template<typename T>
NonnullRefPtr<StyleFunctionRule> Parser::consume_a_function(TokenStream<T>& tokens)
{
@@ -1344,11 +1309,6 @@ NonnullRefPtr<StyleFunctionRule> Parser::consume_a_function(TokenStream<T>& toke
return function;
}
-Optional<StyleDeclarationRule> Parser::consume_a_declaration()
-{
- return consume_a_declaration(m_token_stream);
-}
-
// https://www.w3.org/TR/css-syntax-3/#consume-declaration
template<typename T>
Optional<StyleDeclarationRule> Parser::consume_a_declaration(TokenStream<T>& tokens)
@@ -1452,11 +1412,6 @@ Optional<StyleDeclarationRule> Parser::consume_a_declaration(TokenStream<T>& tok
return declaration;
}
-Vector<DeclarationOrAtRule> Parser::consume_a_list_of_declarations()
-{
- return consume_a_list_of_declarations(m_token_stream);
-}
-
template<typename T>
Vector<DeclarationOrAtRule> Parser::consume_a_list_of_declarations(TokenStream<T>& tokens)
{
@@ -1530,7 +1485,7 @@ RefPtr<CSSRule> Parser::parse_a_rule(TokenStream<T>& tokens)
if (token.is(Token::Type::EndOfFile)) {
return {};
} else if (token.is(Token::Type::AtKeyword)) {
- auto at_rule = consume_an_at_rule();
+ auto at_rule = consume_an_at_rule(m_token_stream);
rule = convert_to_rule(at_rule);
} else {
auto qualified_rule = consume_a_qualified_rule(tokens);
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
index 276b987b8c..f40976655f 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h
@@ -151,41 +151,25 @@ private:
Optional<Selector::SimpleSelector::ANPlusBPattern> parse_a_n_plus_b_pattern(TokenStream<StyleComponentValueRule>&);
- [[nodiscard]] NonnullRefPtrVector<StyleRule> consume_a_list_of_rules(bool top_level);
template<typename T>
[[nodiscard]] NonnullRefPtrVector<StyleRule> consume_a_list_of_rules(TokenStream<T>&, bool top_level);
-
- [[nodiscard]] NonnullRefPtr<StyleRule> consume_an_at_rule();
template<typename T>
[[nodiscard]] NonnullRefPtr<StyleRule> consume_an_at_rule(TokenStream<T>&);
-
- [[nodiscard]] RefPtr<StyleRule> consume_a_qualified_rule();
template<typename T>
[[nodiscard]] RefPtr<StyleRule> consume_a_qualified_rule(TokenStream<T>&);
-
- [[nodiscard]] Vector<DeclarationOrAtRule> consume_a_list_of_declarations();
template<typename T>
[[nodiscard]] Vector<DeclarationOrAtRule> consume_a_list_of_declarations(TokenStream<T>&);
-
- [[nodiscard]] Optional<StyleDeclarationRule> consume_a_declaration();
template<typename T>
[[nodiscard]] Optional<StyleDeclarationRule> consume_a_declaration(TokenStream<T>&);
-
- [[nodiscard]] StyleComponentValueRule consume_a_component_value();
template<typename T>
[[nodiscard]] StyleComponentValueRule consume_a_component_value(TokenStream<T>&);
-
- [[nodiscard]] NonnullRefPtr<StyleBlockRule> consume_a_simple_block();
template<typename T>
[[nodiscard]] NonnullRefPtr<StyleBlockRule> consume_a_simple_block(TokenStream<T>&);
-
- [[nodiscard]] NonnullRefPtr<StyleFunctionRule> consume_a_function();
template<typename T>
[[nodiscard]] NonnullRefPtr<StyleFunctionRule> consume_a_function(TokenStream<T>&);
struct GeneralEnclosed {
};
- [[nodiscard]] Optional<GeneralEnclosed> parse_general_enclosed();
template<typename T>
[[nodiscard]] Optional<GeneralEnclosed> parse_general_enclosed(TokenStream<T>&);