зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
00ae32a7b2
Коммит
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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче