2020-01-18 05:38:21 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2021-03-07 11:00:02 -03:00
|
|
|
#include <LibWeb/CSS/CSSStyleRule.h>
|
2019-06-21 14:19:49 -03:00
|
|
|
|
2020-07-26 15:01:35 -03:00
|
|
|
namespace Web::CSS {
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2021-07-12 13:30:40 -03:00
|
|
|
CSSStyleRule::CSSStyleRule(NonnullRefPtrVector<Selector>&& selectors, NonnullRefPtr<CSSStyleDeclaration>&& declaration)
|
2019-06-21 14:19:49 -03:00
|
|
|
: m_selectors(move(selectors))
|
2019-09-30 15:06:17 -03:00
|
|
|
, m_declaration(move(declaration))
|
2019-06-21 14:19:49 -03:00
|
|
|
{
|
2019-06-21 15:54:13 -03:00
|
|
|
}
|
2019-06-21 14:19:49 -03:00
|
|
|
|
2021-03-07 11:00:02 -03:00
|
|
|
CSSStyleRule::~CSSStyleRule()
|
2019-06-21 15:54:13 -03:00
|
|
|
{
|
2019-06-21 14:19:49 -03:00
|
|
|
}
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2021-09-29 18:43:18 -03:00
|
|
|
// https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
|
|
|
|
|
String CSSStyleRule::selector_text() const
|
|
|
|
|
{
|
|
|
|
|
TODO();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
|
|
|
|
|
void CSSStyleRule::set_selector_text(StringView selector_text)
|
|
|
|
|
{
|
|
|
|
|
// FIXME: 1. Run the parse a group of selectors algorithm on the given value.
|
|
|
|
|
|
|
|
|
|
// FIXME: 2. If the algorithm returns a non-null value replace the associated group of selectors with the returned value.
|
|
|
|
|
|
|
|
|
|
// FIXME: 3. Otherwise, if the algorithm returns a null value, do nothing.
|
|
|
|
|
|
|
|
|
|
(void)selector_text;
|
|
|
|
|
TODO();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// https://drafts.csswg.org/cssom/#dom-cssstylerule-style
|
|
|
|
|
CSSStyleDeclaration* CSSStyleRule::style()
|
|
|
|
|
{
|
|
|
|
|
return m_declaration;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-07 06:27:02 -03:00
|
|
|
}
|