From 7272997b1bb492fa7c46344f091223a8c1eda3b2 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 12 Apr 2022 14:55:53 +0100 Subject: [PATCH] LibWeb: Move StyleRule to Parser namespace --- Userland/Libraries/LibWeb/CSS/Parser/StyleRule.cpp | 2 +- Userland/Libraries/LibWeb/CSS/Parser/StyleRule.h | 12 ++++++------ Userland/Libraries/LibWeb/Forward.h | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.cpp b/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.cpp index 177e4e1648..aba0decaa9 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.cpp @@ -8,7 +8,7 @@ #include #include -namespace Web::CSS { +namespace Web::CSS::Parser { StyleRule::StyleRule(StyleRule::Type type) : m_type(type) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.h b/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.h index 1b5a146377..70b8084697 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/StyleRule.h @@ -12,10 +12,10 @@ #include #include -namespace Web::CSS { +namespace Web::CSS::Parser { class StyleRule : public RefCounted { - friend class Parser::Parser; + friend class Parser; public: enum class Type { @@ -29,8 +29,8 @@ public: bool is_qualified_rule() const { return m_type == Type::Qualified; } bool is_at_rule() const { return m_type == Type::At; } - Vector const& prelude() const { return m_prelude; } - RefPtr block() const { return m_block; } + Vector const& prelude() const { return m_prelude; } + RefPtr block() const { return m_block; } String const& at_rule_name() const { return m_at_rule_name; } String to_string() const; @@ -38,8 +38,8 @@ public: private: Type const m_type; String m_at_rule_name; - Vector m_prelude; - RefPtr m_block; + Vector m_prelude; + RefPtr m_block; }; } diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h index 4e5dd391fd..d30382cf5c 100644 --- a/Userland/Libraries/LibWeb/Forward.h +++ b/Userland/Libraries/LibWeb/Forward.h @@ -105,6 +105,7 @@ class Declaration; class DeclarationOrAtRule; class Function; class Parser; +class StyleRule; } namespace Web::DOM {