mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +00:00
LibWeb/CSS: Add CSSOM types for @layer
rules
Depending on usage, `@layer` has two forms, with two different CSSOM types. One simply lists layer names and the other defines a layer with its contained rules.
This commit is contained in:
parent
bf9d05d97a
commit
1c6133aa52
Notes:
github-actions[bot]
2024-09-06 05:51:10 +00:00
Author: https://github.com/AtkinsSJ
Commit: 1c6133aa52
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1291
17 changed files with 346 additions and 27 deletions
|
@ -31,6 +31,9 @@ public:
|
|||
Keyframe = 8,
|
||||
Namespace = 10,
|
||||
Supports = 12,
|
||||
// AD-HOC: These are not included in the spec, but we need them internally. So, their numbers are arbitrary.
|
||||
LayerBlock = 100,
|
||||
LayerStatement = 101,
|
||||
};
|
||||
|
||||
virtual Type type() const = 0;
|
||||
|
@ -39,6 +42,7 @@ public:
|
|||
void set_css_text(StringView);
|
||||
|
||||
CSSRule* parent_rule() { return m_parent_rule.ptr(); }
|
||||
CSSRule const* parent_rule() const { return m_parent_rule.ptr(); }
|
||||
void set_parent_rule(CSSRule*);
|
||||
|
||||
CSSStyleSheet* parent_style_sheet() { return m_parent_style_sheet.ptr(); }
|
||||
|
@ -54,6 +58,8 @@ protected:
|
|||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
String parent_layer_internal_qualified_name() const;
|
||||
|
||||
JS::GCPtr<CSSRule> m_parent_rule;
|
||||
JS::GCPtr<CSSStyleSheet> m_parent_style_sheet;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue