diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-04-22 19:56:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-11 20:16:10 +0200 |
commit | c718ba59478e63a46542c66f0fb241d1fa9f4b2b (patch) | |
tree | f6f4340f67577405731cd18d1242069086504576 /Userland/Libraries/LibWeb/CSS/CSSRule.idl | |
parent | 6e6607a92f3e00a1e349556f6a211507d26774ab (diff) | |
download | serenity-c718ba59478e63a46542c66f0fb241d1fa9f4b2b.zip |
LibWeb: Implement CSSRule.parentRule and .parentStyleSheet
Both of these are supposed to be set when the CSSRule is created. The
spec is silent on setting it when a CSSRule is added to a parent. So,
this is a bit ad-hoc.
The parent rule gets set whenever a rule is added to a new parent. The
parent stylesheet gets set whenever the rule or one of its ancestors is
added to a different stylesheet. There may be some nuance there that
I'm missing, but I'm sure we'll find out quickly once we have WPT
running!
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSRule.idl')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/CSSRule.idl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSRule.idl b/Userland/Libraries/LibWeb/CSS/CSSRule.idl index b2d416c6f8..bd40b41bd6 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSRule.idl +++ b/Userland/Libraries/LibWeb/CSS/CSSRule.idl @@ -1,7 +1,13 @@ +#import <CSS/CSSStyleSheet.idl> + +[Exposed=Window] interface CSSRule { attribute CSSOMString cssText; + readonly attribute CSSRule? parentRule; + readonly attribute CSSStyleSheet? parentStyleSheet; + readonly attribute unsigned short type; const unsigned short STYLE_RULE = 1; |