mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00: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
4 changed files with 11 additions and 3 deletions
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 <ARIA/ARIAMixin.idl>
|
||||||
#import <CSS/CSSStyleDeclaration.idl>
|
|
||||||
#import <DOM/Attr.idl>
|
#import <DOM/Attr.idl>
|
||||||
#import <DOM/ChildNode.idl>
|
#import <DOM/ChildNode.idl>
|
||||||
#import <DOM/DOMTokenList.idl>
|
#import <DOM/DOMTokenList.idl>
|
||||||
|
@ -62,8 +61,6 @@ interface Element : Node {
|
||||||
readonly attribute Element? nextElementSibling;
|
readonly attribute Element? nextElementSibling;
|
||||||
readonly attribute Element? previousElementSibling;
|
readonly attribute Element? previousElementSibling;
|
||||||
|
|
||||||
[ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
|
|
||||||
|
|
||||||
DOMRect getBoundingClientRect();
|
DOMRect getBoundingClientRect();
|
||||||
DOMRectList getClientRects();
|
DOMRectList getClientRects();
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#import <CSS/ElementCSSInlineStyle.idl>
|
||||||
#import <HTML/DOMStringMap.idl>
|
#import <HTML/DOMStringMap.idl>
|
||||||
#import <DOM/EventHandler.idl>
|
#import <DOM/EventHandler.idl>
|
||||||
|
|
||||||
|
@ -37,3 +38,5 @@ interface mixin HTMLOrSVGElement {
|
||||||
[CEReactions, Reflect] attribute boolean autofocus;
|
[CEReactions, Reflect] attribute boolean autofocus;
|
||||||
[CEReactions] attribute long tabIndex;
|
[CEReactions] attribute long tabIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
HTMLElement includes ElementCSSInlineStyle;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#import <CSS/ElementCSSInlineStyle.idl>
|
||||||
#import <DOM/Element.idl>
|
#import <DOM/Element.idl>
|
||||||
#import <HTML/HTMLElement.idl>
|
#import <HTML/HTMLElement.idl>
|
||||||
#import <HTML/DOMStringMap.idl>
|
#import <HTML/DOMStringMap.idl>
|
||||||
|
@ -8,3 +9,4 @@ interface SVGElement : Element {
|
||||||
};
|
};
|
||||||
|
|
||||||
SVGElement includes HTMLOrSVGElement;
|
SVGElement includes HTMLOrSVGElement;
|
||||||
|
SVGElement includes ElementCSSInlineStyle;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue