diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-04-22 14:14:16 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-11 20:16:10 +0200 |
commit | 1951873a5d7f640ad9994d7b0c21d13c2cbf78e9 (patch) | |
tree | 866b5bfb2c31621920e4f9005e0b6cdd3f35405c /Userland/Libraries/LibWeb | |
parent | cfe5d63a1e77ec264a4d78616be4865121681d5f (diff) | |
download | serenity-1951873a5d7f640ad9994d7b0c21d13c2cbf78e9.zip |
LibWeb: Add CSSConditionRule wrapper
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/CSSConditionRule.h | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/CSSConditionRule.idl | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Forward.h | 2 |
5 files changed, 12 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h b/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h index 4a0df4cc05..9f16e6bb9d 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h @@ -15,6 +15,8 @@ #include <LibWeb/Bindings/AbstractRangeConstructor.h> #include <LibWeb/Bindings/AbstractRangePrototype.h> #include <LibWeb/Bindings/AudioConstructor.h> +#include <LibWeb/Bindings/CSSConditionRuleConstructor.h> +#include <LibWeb/Bindings/CSSConditionRulePrototype.h> #include <LibWeb/Bindings/CSSFontFaceRuleConstructor.h> #include <LibWeb/Bindings/CSSFontFaceRulePrototype.h> #include <LibWeb/Bindings/CSSGroupingRuleConstructor.h> @@ -358,7 +360,7 @@ ADD_WINDOW_OBJECT_INTERFACE(AbortController) \ ADD_WINDOW_OBJECT_INTERFACE(AbortSignal) \ ADD_WINDOW_OBJECT_INTERFACE(AbstractRange) \ - ADD_WINDOW_OBJECT_INTERFACE(Crypto) \ + ADD_WINDOW_OBJECT_INTERFACE(CSSConditionRule) \ ADD_WINDOW_OBJECT_INTERFACE(CSSFontFaceRule) \ ADD_WINDOW_OBJECT_INTERFACE(CSSGroupingRule) \ ADD_WINDOW_OBJECT_INTERFACE(CSSRule) \ @@ -371,6 +373,7 @@ ADD_WINDOW_OBJECT_INTERFACE(CharacterData) \ ADD_WINDOW_OBJECT_INTERFACE(CloseEvent) \ ADD_WINDOW_OBJECT_INTERFACE(Comment) \ + ADD_WINDOW_OBJECT_INTERFACE(Crypto) \ ADD_WINDOW_OBJECT_INTERFACE(CustomEvent) \ ADD_WINDOW_OBJECT_INTERFACE(DocumentFragment) \ ADD_WINDOW_OBJECT_INTERFACE(Document) \ diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt index cc04d4f56b..91d7d3205a 100644 --- a/Userland/Libraries/LibWeb/CMakeLists.txt +++ b/Userland/Libraries/LibWeb/CMakeLists.txt @@ -451,6 +451,7 @@ endfunction() libweb_js_wrapper(Crypto/Crypto) libweb_js_wrapper(Crypto/SubtleCrypto) +libweb_js_wrapper(CSS/CSSConditionRule) libweb_js_wrapper(CSS/CSSFontFaceRule) libweb_js_wrapper(CSS/CSSGroupingRule) libweb_js_wrapper(CSS/CSSRule) diff --git a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h index 78f58a9655..6cf61c2219 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org> + * Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -17,7 +17,9 @@ class CSSConditionRule : public CSSGroupingRule { AK_MAKE_NONMOVABLE(CSSConditionRule); public: - ~CSSConditionRule() = default; + using WrapperType = Bindings::CSSConditionRuleWrapper; + + virtual ~CSSConditionRule() = default; virtual String condition_text() const = 0; virtual void set_condition_text(String) = 0; diff --git a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.idl b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.idl index a5bbf70e27..73c336eaaa 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.idl +++ b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.idl @@ -1,5 +1,6 @@ #import <CSS/CSSGroupingRule.idl> +[Exposed=Window] interface CSSConditionRule : CSSGroupingRule { attribute CSSOMString conditionText; }; diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h index ed1019e9f9..6bbf21a341 100644 --- a/Userland/Libraries/LibWeb/Forward.h +++ b/Userland/Libraries/LibWeb/Forward.h @@ -35,6 +35,7 @@ class BorderStyleValue; class CalculatedStyleValue; class ColorStyleValue; class ContentStyleValue; +class CSSConditionRule; class CSSGroupingRule; class CSSImportRule; class CSSFontFaceRule; @@ -407,6 +408,7 @@ class CharacterDataWrapper; class CloseEventWrapper; class CommentWrapper; class CryptoWrapper; +class CSSConditionRuleWrapper; class CSSFontFaceRuleWrapper; class CSSGroupingRuleWrapper; class CSSRuleListWrapper; |