From 899fa30bddb400a6f8492a3e9f747bce6ad468f5 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 27 Jul 2022 20:30:32 +0100 Subject: [PATCH] LibWeb: Extract the LinkStyle IDL mixin --- Userland/Libraries/LibWeb/CSS/LinkStyle.idl | 6 ++++++ Userland/Libraries/LibWeb/HTML/HTMLStyleElement.idl | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 Userland/Libraries/LibWeb/CSS/LinkStyle.idl diff --git a/Userland/Libraries/LibWeb/CSS/LinkStyle.idl b/Userland/Libraries/LibWeb/CSS/LinkStyle.idl new file mode 100644 index 0000000000..d44e6fc8df --- /dev/null +++ b/Userland/Libraries/LibWeb/CSS/LinkStyle.idl @@ -0,0 +1,6 @@ +#import + +// https://www.w3.org/TR/cssom-1/#ref-for-linkstyle +interface mixin LinkStyle { + readonly attribute CSSStyleSheet? sheet; +}; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLStyleElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLStyleElement.idl index 322862742f..c33e8be66d 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLStyleElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLStyleElement.idl @@ -1,13 +1,17 @@ #import +#import #import +// https://html.spec.whatwg.org/multipage/semantics.html#htmlstyleelement interface HTMLStyleElement : HTMLElement { + // FIXME: [HTMLConstructor] constructor(); + // FIXME: attribute boolean disabled; [Reflect] attribute DOMString media; + // FIXME: [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking; + // Obsolete [Reflect] attribute DOMString type; - - // FIXME: This should come from a LinkStyle mixin - readonly attribute CSSStyleSheet? sheet; - }; + +HTMLStyleElement includes LinkStyle;