diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-03-28 20:30:26 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-28 22:25:25 +0200 |
commit | 804b8c85e8ff12ce8dd489b41d8626426c9f5488 (patch) | |
tree | 84cb0ae0781da17e7aa26e44deedc28b3f7bc13b /Userland/Libraries/LibWeb/Bindings | |
parent | 1dcde5792265e6417bb2700a781dfc181bc7da0d (diff) | |
download | serenity-804b8c85e8ff12ce8dd489b41d8626426c9f5488.zip |
LibWeb: Implement initial CSSFontFaceRule and FontFace classes
For now, this is the bare minimum that's needed: font-family and src.
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp b/Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp index e20db17db7..bafaea3772 100644 --- a/Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp +++ b/Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp @@ -5,9 +5,11 @@ */ #include <AK/TypeCasts.h> +#include <LibWeb/Bindings/CSSFontFaceRuleWrapper.h> #include <LibWeb/Bindings/CSSRuleWrapper.h> #include <LibWeb/Bindings/CSSRuleWrapperFactory.h> #include <LibWeb/Bindings/CSSStyleRuleWrapper.h> +#include <LibWeb/CSS/CSSFontFaceRule.h> #include <LibWeb/CSS/CSSStyleRule.h> namespace Web::Bindings { @@ -19,6 +21,8 @@ CSSRuleWrapper* wrap(JS::GlobalObject& global_object, CSS::CSSRule& rule) if (is<CSS::CSSStyleRule>(rule)) return static_cast<CSSRuleWrapper*>(wrap_impl(global_object, verify_cast<CSS::CSSStyleRule>(rule))); + if (is<CSS::CSSFontFaceRule>(rule)) + return static_cast<CSSRuleWrapper*>(wrap_impl(global_object, verify_cast<CSS::CSSFontFaceRule>(rule))); return static_cast<CSSRuleWrapper*>(wrap_impl(global_object, rule)); } diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h b/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h index 805a6f6663..53dd04c7b8 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/CSSFontFaceRuleConstructor.h> +#include <LibWeb/Bindings/CSSFontFaceRulePrototype.h> #include <LibWeb/Bindings/CSSRuleConstructor.h> #include <LibWeb/Bindings/CSSRuleListConstructor.h> #include <LibWeb/Bindings/CSSRuleListPrototype.h> @@ -340,6 +342,7 @@ ADD_WINDOW_OBJECT_INTERFACE(AbortSignal) \ ADD_WINDOW_OBJECT_INTERFACE(AbstractRange) \ ADD_WINDOW_OBJECT_INTERFACE(Crypto) \ + ADD_WINDOW_OBJECT_INTERFACE(CSSFontFaceRule) \ ADD_WINDOW_OBJECT_INTERFACE(CSSRule) \ ADD_WINDOW_OBJECT_INTERFACE(CSSRuleList) \ ADD_WINDOW_OBJECT_INTERFACE(CSSStyleDeclaration) \ |