mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-19 09:17:38 +03:00
LibWeb: Move Element.prototype.style to ElementCSSInlineStyle mixin
Also adds the `PutForwards` extended attribute allowing setting the style property.
This commit is contained in:
parent
63ca149be5
commit
03c225b023
Notes:
sideshowbarker
2024-07-16 23:23:26 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/03c225b023 Pull-request: https://github.com/SerenityOS/serenity/pull/17949 Reviewed-by: https://github.com/trflynn89 ✅
6
Userland/Libraries/LibWeb/CSS/ElementCSSInlineStyle.idl
Normal file
6
Userland/Libraries/LibWeb/CSS/ElementCSSInlineStyle.idl
Normal file
@ -0,0 +1,6 @@
|
||||
#import <CSS/CSSStyleDeclaration.idl>
|
||||
|
||||
// https://w3c.github.io/csswg-drafts/cssom/#elementcssinlinestyle
|
||||
interface mixin ElementCSSInlineStyle {
|
||||
[SameObject, PutForwards=cssText, ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
@ -1,5 +1,4 @@
|
||||
#import <ARIA/ARIAMixin.idl>
|
||||
#import <CSS/CSSStyleDeclaration.idl>
|
||||
#import <DOM/Attr.idl>
|
||||
#import <DOM/ChildNode.idl>
|
||||
#import <DOM/DOMTokenList.idl>
|
||||
@ -62,8 +61,6 @@ interface Element : Node {
|
||||
readonly attribute Element? nextElementSibling;
|
||||
readonly attribute Element? previousElementSibling;
|
||||
|
||||
[ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
|
||||
|
||||
DOMRect getBoundingClientRect();
|
||||
DOMRectList getClientRects();
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#import <CSS/ElementCSSInlineStyle.idl>
|
||||
#import <HTML/DOMStringMap.idl>
|
||||
#import <DOM/EventHandler.idl>
|
||||
|
||||
@ -37,3 +38,5 @@ interface mixin HTMLOrSVGElement {
|
||||
[CEReactions, Reflect] attribute boolean autofocus;
|
||||
[CEReactions] attribute long tabIndex;
|
||||
};
|
||||
|
||||
HTMLElement includes ElementCSSInlineStyle;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#import <CSS/ElementCSSInlineStyle.idl>
|
||||
#import <DOM/Element.idl>
|
||||
#import <HTML/HTMLElement.idl>
|
||||
#import <HTML/DOMStringMap.idl>
|
||||
@ -8,3 +9,4 @@ interface SVGElement : Element {
|
||||
};
|
||||
|
||||
SVGElement includes HTMLOrSVGElement;
|
||||
SVGElement includes ElementCSSInlineStyle;
|
||||
|
Loading…
Reference in New Issue
Block a user