mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
|
@ -13,11 +13,19 @@ namespace Web::CSS {
|
|||
|
||||
JS_DEFINE_ALLOCATOR(CSSKeyframeRule);
|
||||
|
||||
JS::NonnullGCPtr<CSSKeyframeRule> CSSKeyframeRule::create(JS::Realm& realm, CSS::Percentage key, Web::CSS::CSSStyleDeclaration& declarations)
|
||||
JS::NonnullGCPtr<CSSKeyframeRule> CSSKeyframeRule::create(JS::Realm& realm, CSS::Percentage key, Web::CSS::PropertyOwningCSSStyleDeclaration& declarations)
|
||||
{
|
||||
return realm.heap().allocate<CSSKeyframeRule>(realm, realm, key, declarations);
|
||||
}
|
||||
|
||||
CSSKeyframeRule::CSSKeyframeRule(JS::Realm& realm, CSS::Percentage key, PropertyOwningCSSStyleDeclaration& declarations)
|
||||
: CSSRule(realm)
|
||||
, m_key(key)
|
||||
, m_declarations(declarations)
|
||||
{
|
||||
m_declarations->set_parent_rule(*this);
|
||||
}
|
||||
|
||||
void CSSKeyframeRule::visit_edges(Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue