Bug 1400022 - Backed out changeset 610fbd30a6a3 (
bug 1397057). r?mattwoodrow
The SchedulePaint() ends up calling
nsSVGEffects::InvalidateDirectRenderingObservers, it doesn't need for retained
display list, and causes harmful restyle events for stylo.
We will call ScheulePaint without involing InvalidateDirectRenderingObservers
later in another bug.
MozReview-Commit-ID: 10V9JLHZmCs
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -972,19 +972,16 @@ KeyframeEffectReadOnly::UpdateTargetRegi
"Out of date Animation::IsRelevant value");
if (isRelevant && !mInEffectSet) {
EffectSet* effectSet =
EffectSet::GetOrCreateEffectSet(mTarget->mElement, mTarget->mPseudoType);
effectSet->AddEffect(*this);
mInEffectSet = true;
UpdateEffectSet(effectSet);
- if (mTarget->mElement->GetPrimaryFrame()) {
- mTarget->mElement->GetPrimaryFrame()->SchedulePaint();
- }
} else if (!isRelevant && mInEffectSet) {
UnregisterTarget();
}
}
void
KeyframeEffectReadOnly::UnregisterTarget()
{
@@ -999,19 +996,16 @@ KeyframeEffectReadOnly::UnregisterTarget
mInEffectSet = false;
if (effectSet) {
effectSet->RemoveEffect(*this);
if (effectSet->IsEmpty()) {
EffectSet::DestroyEffectSet(mTarget->mElement, mTarget->mPseudoType);
}
}
- if (mTarget->mElement->GetPrimaryFrame()) {
- mTarget->mElement->GetPrimaryFrame()->SchedulePaint();
- }
}
void
KeyframeEffectReadOnly::RequestRestyle(
EffectCompositor::RestyleType aRestyleType)
{
if (!mTarget) {
return;