mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Bug 1422197 - Add fast path to get DocGroup in binding code for [CEReactions]
Tag #1375
This commit is contained in:
parent
fc8fcfc039
commit
ca09afd0b0
30 changed files with 206 additions and 44 deletions
|
|
@ -1515,6 +1515,13 @@ nsCSSFontFaceStyleDecl::GetParentObject()
|
|||
return ContainingRule()->GetDocument();
|
||||
}
|
||||
|
||||
DocGroup*
|
||||
nsCSSFontFaceStyleDecl::GetDocGroup() const
|
||||
{
|
||||
nsIDocument* document = ContainingRule()->GetDocument();
|
||||
return document ? document->GetDocGroup() : nullptr;
|
||||
}
|
||||
|
||||
JSObject*
|
||||
nsCSSFontFaceStyleDecl::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
|
||||
{
|
||||
|
|
@ -1991,6 +1998,17 @@ nsCSSKeyframeStyleDeclaration::GetParentObject()
|
|||
return mRule ? mRule->GetDocument() : nullptr;
|
||||
}
|
||||
|
||||
DocGroup*
|
||||
nsCSSKeyframeStyleDeclaration::GetDocGroup() const
|
||||
{
|
||||
if (!mRule) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIDocument* document = mRule->GetDocument();
|
||||
return document ? document->GetDocGroup() : nullptr;
|
||||
}
|
||||
|
||||
// -------------------------------------------
|
||||
// nsCSSKeyframeRule
|
||||
//
|
||||
|
|
@ -2538,6 +2556,17 @@ nsCSSPageStyleDeclaration::GetParentObject()
|
|||
return mRule ? mRule->GetDocument() : nullptr;
|
||||
}
|
||||
|
||||
DocGroup*
|
||||
nsCSSPageStyleDeclaration::GetDocGroup() const
|
||||
{
|
||||
if (!mRule) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIDocument* document = mRule->GetDocument();
|
||||
return document ? document->GetDocGroup() : nullptr;
|
||||
}
|
||||
|
||||
// -------------------------------------------
|
||||
// nsCSSPageRule
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue