mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb/CSS: Stop assuming CSSNestedDeclarations's parent is CSSStyleRule
This will no longer be true once we implement at-rules nested inside style rules, for example: ```css .foo { color: yellow; @media (min-width: 800px) { color: orange; } } ```
This commit is contained in:
parent
0b23dddb4b
commit
ce947ff983
Notes:
github-actions[bot]
2024-11-07 14:12:42 +00:00
Author: https://github.com/AtkinsSJ
Commit: ce947ff983
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2202
3 changed files with 31 additions and 3 deletions
|
@ -23,14 +23,18 @@ public:
|
|||
|
||||
CSSStyleDeclaration* style();
|
||||
|
||||
CSSStyleRule const& parent_style_rule() const;
|
||||
|
||||
private:
|
||||
CSSNestedDeclarations(JS::Realm&, PropertyOwningCSSStyleDeclaration&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
virtual String serialized() const override;
|
||||
virtual void clear_caches() override;
|
||||
|
||||
JS::NonnullGCPtr<PropertyOwningCSSStyleDeclaration> m_declaration;
|
||||
JS::GCPtr<CSSStyleRule const> mutable m_parent_style_rule;
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue