diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-09-28 16:53:15 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-29 18:57:48 +0200 |
commit | 0b23a20ad56806e82ad67de05c82c5e3a4b47218 (patch) | |
tree | 9434db6c964c3f6ebd6f8aadce5dc19eee93d69c /Userland/Libraries/LibWeb/CSS/CSSConditionRule.h | |
parent | 06f93950568b8e5167f64007fa4980a3050904a2 (diff) | |
download | serenity-0b23a20ad56806e82ad67de05c82c5e3a4b47218.zip |
LibWeb: Add CSSConditionRule
https://www.w3.org/TR/css-conditional-3/#the-cssconditionrule-interface
This simply exposes a condition string, which is implemented differently
in each sub-class.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSConditionRule.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/CSSConditionRule.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h new file mode 100644 index 0000000000..7fb5b55caa --- /dev/null +++ b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <AK/NonnullRefPtr.h> +#include <LibWeb/CSS/CSSGroupingRule.h> +#include <LibWeb/Forward.h> + +namespace Web::CSS { + +class CSSConditionRule : public CSSGroupingRule { + AK_MAKE_NONCOPYABLE(CSSConditionRule); + AK_MAKE_NONMOVABLE(CSSConditionRule); + +public: + ~CSSConditionRule(); + + virtual String condition_text() const = 0; + virtual void set_condition_text(String) = 0; + +protected: + explicit CSSConditionRule(NonnullRefPtrVector<CSSRule>&&); +}; + +} |