From d2f9d2fe51a553acfba408dd6e4be94d45f8d643 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 3 Dec 2021 12:12:44 +0000 Subject: [PATCH] LibWeb: Make StyleBlockRule more accessible to outsiders For our naive var() implementation, we need to be able to create StyleBlockRules outside of the Parser, and these changes make that possible. --- Userland/Libraries/LibWeb/CSS/Parser/StyleBlockRule.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/StyleBlockRule.h b/Userland/Libraries/LibWeb/CSS/Parser/StyleBlockRule.h index e22de43613..43ddecff81 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/StyleBlockRule.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/StyleBlockRule.h @@ -19,12 +19,19 @@ class StyleBlockRule : public RefCounted { public: StyleBlockRule(); + explicit StyleBlockRule(Token token, Vector&& values) + : m_token(token) + , m_values(move(values)) + { + } ~StyleBlockRule(); bool is_curly() const { return m_token.is(Token::Type::OpenCurly); } bool is_paren() const { return m_token.is(Token::Type::OpenParen); } bool is_square() const { return m_token.is(Token::Type::OpenSquare); } + Token const& token() const { return m_token; } + Vector const& values() const { return m_values; } String to_string() const;