summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-09-28 16:20:32 +0100
committerAndreas Kling <kling@serenityos.org>2021-09-29 18:57:48 +0200
commit06f93950568b8e5167f64007fa4980a3050904a2 (patch)
tree64c2a927e984b9440e1ab68fb938b3e42c8e82a1 /Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp
parenteb83d2617caa437bfebdb00967bc71c760d1a3a5 (diff)
downloadserenity-06f93950568b8e5167f64007fa4980a3050904a2.zip
LibWeb: Add CSSGroupingRule
This is an abstract base class for CSSRules that hold a CSSRuleList.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp
new file mode 100644
index 0000000000..59cc281c69
--- /dev/null
+++ b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <LibWeb/CSS/CSSGroupingRule.h>
+#include <LibWeb/CSS/CSSRuleList.h>
+
+namespace Web::CSS {
+
+CSSGroupingRule::CSSGroupingRule(NonnullRefPtrVector<CSSRule>&& rules)
+ : m_rules(CSSRuleList { move(rules) })
+{
+}
+
+CSSGroupingRule::~CSSGroupingRule()
+{
+}
+
+size_t CSSGroupingRule::insert_rule(StringView const&, size_t)
+{
+ // https://www.w3.org/TR/cssom-1/#insert-a-css-rule
+ TODO();
+}
+
+void CSSGroupingRule::delete_rule(size_t)
+{
+ // https://www.w3.org/TR/cssom-1/#remove-a-css-rule
+ TODO();
+}
+
+}