mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1340958 - Do not call EffectCompositor::GetServoAnimationRule for print preview. r=heycam
The only one caller of GetServoAnimationRule is Gecko_GetAnimationRule. There is no risk that pres context is destroyed in Gecko_GetAnimationRule. MozReview-Commit-ID: 52pxbCiCNoJ --HG-- extra : rebase_source : 8000e267d1d5706c709f807e11396dda3579c4dc
This commit is contained in:
parent
00ae32a7b2
commit
a3c9c5051e
@ -482,10 +482,8 @@ EffectCompositor::GetServoAnimationRule(const dom::Element* aElement,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
CascadeLevel aCascadeLevel)
|
||||
{
|
||||
if (!mPresContext || !mPresContext->IsDynamic()) {
|
||||
// For print or print preview, ignore animations.
|
||||
return nullptr;
|
||||
}
|
||||
MOZ_ASSERT(mPresContext && mPresContext->IsDynamic(),
|
||||
"Should not be in print preview");
|
||||
|
||||
EffectSet* effectSet = EffectSet::GetEffectSet(aElement, aPseudoType);
|
||||
if (!effectSet) {
|
||||
|
@ -404,7 +404,8 @@ Gecko_GetAnimationRule(RawGeckoElementBorrowed aElement,
|
||||
return emptyDeclarationBlock;
|
||||
}
|
||||
nsPresContext* presContext = doc->GetShell()->GetPresContext();
|
||||
if (!presContext) {
|
||||
if (!presContext || !presContext->IsDynamic()) {
|
||||
// For print or print preview, ignore animations.
|
||||
return emptyDeclarationBlock;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user