mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Implement CSSStyleDeclaration.parentRule
This readonly attribute returns the containing CSS rule, or null (in the case of element inline style).
This commit is contained in:
parent
ec4d29849d
commit
a12d28fd30
Notes:
sideshowbarker
2024-07-18 03:23:00 +09:00
Author: https://github.com/awesomekling
Commit: a12d28fd30
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/168
8 changed files with 55 additions and 10 deletions
|
@ -21,7 +21,7 @@ class CSSKeyframeRule final : public CSSRule {
|
|||
JS_DECLARE_ALLOCATOR(CSSKeyframeRule);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<CSSKeyframeRule> create(JS::Realm&, CSS::Percentage key, CSSStyleDeclaration&);
|
||||
static JS::NonnullGCPtr<CSSKeyframeRule> create(JS::Realm&, CSS::Percentage key, PropertyOwningCSSStyleDeclaration&);
|
||||
|
||||
virtual ~CSSKeyframeRule() = default;
|
||||
|
||||
|
@ -41,19 +41,14 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
CSSKeyframeRule(JS::Realm& realm, CSS::Percentage key, CSSStyleDeclaration& declarations)
|
||||
: CSSRule(realm)
|
||||
, m_key(key)
|
||||
, m_declarations(declarations)
|
||||
{
|
||||
}
|
||||
CSSKeyframeRule(JS::Realm&, CSS::Percentage, PropertyOwningCSSStyleDeclaration&);
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual String serialized() const override;
|
||||
|
||||
CSS::Percentage m_key;
|
||||
JS::NonnullGCPtr<CSSStyleDeclaration> m_declarations;
|
||||
JS::NonnullGCPtr<PropertyOwningCSSStyleDeclaration> m_declarations;
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue