2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2021-03-07 15:00:02 +01:00
|
|
|
#include <LibWeb/CSS/CSSStyleRule.h>
|
2019-06-21 19:19:49 +02:00
|
|
|
|
2020-07-26 20:01:35 +02:00
|
|
|
namespace Web::CSS {
|
2020-03-07 10:27:02 +01:00
|
|
|
|
2021-07-12 17:30:40 +01:00
|
|
|
CSSStyleRule::CSSStyleRule(NonnullRefPtrVector<Selector>&& selectors, NonnullRefPtr<CSSStyleDeclaration>&& declaration)
|
2019-06-21 19:19:49 +02:00
|
|
|
: m_selectors(move(selectors))
|
2019-09-30 20:06:17 +02:00
|
|
|
, m_declaration(move(declaration))
|
2019-06-21 19:19:49 +02:00
|
|
|
{
|
2019-06-21 20:54:13 +02:00
|
|
|
}
|
2019-06-21 19:19:49 +02:00
|
|
|
|
2021-03-07 15:00:02 +01:00
|
|
|
CSSStyleRule::~CSSStyleRule()
|
2019-06-21 20:54:13 +02:00
|
|
|
{
|
2019-06-21 19:19:49 +02:00
|
|
|
}
|
2020-03-07 10:27:02 +01:00
|
|
|
|
2021-09-29 23:43:18 +02: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 10:27:02 +01:00
|
|
|
}
|