зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1361183 - Check Element::MayHaveAnimations() in EffectSet::GetEffectSet(). r=birtles
We can early return to call MayHaveAnimations() (and it should be fast) since we set the flag in EffectSet::GetOrCreateEffectSet(), MozReview-Commit-ID: 2UfWVVi6nY5 --HG-- extra : rebase_source : 97e98bf1fb9e725a107ed3200b95921375bfb637
This commit is contained in:
Родитель
d74b5758ff
Коммит
0935c70f35
|
@ -42,6 +42,10 @@ EffectSet::Traverse(nsCycleCollectionTraversalCallback& aCallback)
|
|||
EffectSet::GetEffectSet(const dom::Element* aElement,
|
||||
CSSPseudoElementType aPseudoType)
|
||||
{
|
||||
if (!aElement->MayHaveAnimations()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
|
||||
return static_cast<EffectSet*>(aElement->GetProperty(propName));
|
||||
}
|
||||
|
@ -56,10 +60,6 @@ EffectSet::GetEffectSet(const nsIFrame* aFrame)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (!target->mElement->MayHaveAnimations()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return GetEffectSet(target->mElement, target->mPseudoType);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче