1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:28:12 +00:00

LibWeb: Add CSSGroupingRule

This is an abstract base class for CSSRules that hold a CSSRuleList.
This commit is contained in:
Sam Atkins 2021-09-28 16:20:32 +01:00 committed by Andreas Kling
parent eb83d2617c
commit 06f9395056
4 changed files with 74 additions and 0 deletions

View file

@ -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();
}
}