mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1026302 part 2 - Move PostRestyleForAnimation to CommonElementAnimationData; r=dbaron
This patch moves PostRestyleForAnimation from ElementAnimations to the base class CommonElementAnimationData and makes use of it within nsTransitionManager.
This commit is contained in:
parent
e1a2c170b9
commit
d95a8b7c55
@ -491,6 +491,11 @@ struct CommonElementAnimationData : public PRCList
|
||||
}
|
||||
}
|
||||
|
||||
void PostRestyleForAnimation(nsPresContext *aPresContext) {
|
||||
nsRestyleHint styleHint = IsForElement() ? eRestyle_Self : eRestyle_Subtree;
|
||||
aPresContext->PresShell()->RestyleForAnimation(mElement, styleHint);
|
||||
}
|
||||
|
||||
static void LogAsyncAnimationFailure(nsCString& aMessage,
|
||||
const nsIContent* aContent = nullptr);
|
||||
|
||||
|
@ -61,11 +61,6 @@ struct ElementAnimations MOZ_FINAL
|
||||
nsAnimationManager *aAnimationManager, TimeStamp aNow);
|
||||
|
||||
void GetEventsAt(TimeStamp aRefreshTime, EventArray &aEventsToDispatch);
|
||||
|
||||
void PostRestyleForAnimation(nsPresContext *aPresContext) {
|
||||
nsRestyleHint styleHint = IsForElement() ? eRestyle_Self : eRestyle_Subtree;
|
||||
aPresContext->PresShell()->RestyleForAnimation(mElement, styleHint);
|
||||
}
|
||||
};
|
||||
|
||||
class nsAnimationManager MOZ_FINAL
|
||||
|
@ -597,12 +597,7 @@ nsTransitionManager::ConsiderStartingTransition(nsCSSProperty aProperty,
|
||||
}
|
||||
}
|
||||
aElementTransitions->UpdateAnimationGeneration(mPresContext);
|
||||
|
||||
nsRestyleHint hint =
|
||||
aNewStyleContext->GetPseudoType() ==
|
||||
nsCSSPseudoElements::ePseudo_NotPseudoElement ?
|
||||
eRestyle_Self : eRestyle_Subtree;
|
||||
presContext->PresShell()->RestyleForAnimation(aElement, hint);
|
||||
aElementTransitions->PostRestyleForAnimation(presContext);
|
||||
|
||||
*aStartedAny = true;
|
||||
aWhichStarted->AddProperty(aProperty);
|
||||
@ -682,10 +677,7 @@ nsTransitionManager::WalkTransitionRule(ElementDependentRuleProcessorData* aData
|
||||
|
||||
// We need to immediately restyle with animation
|
||||
// after doing this.
|
||||
nsRestyleHint hint =
|
||||
aPseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement ?
|
||||
eRestyle_Self : eRestyle_Subtree;
|
||||
mPresContext->PresShell()->RestyleForAnimation(aData->mElement, hint);
|
||||
et->PostRestyleForAnimation(mPresContext);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -877,9 +869,7 @@ nsTransitionManager::FlushTransitions(FlushFlags aFlags)
|
||||
et->mElementProperty == nsGkAtoms::transitionsOfAfterProperty,
|
||||
"Unexpected element property; might restyle too much");
|
||||
if (!canThrottleTick || transitionStartedOrEnded) {
|
||||
nsRestyleHint hint = et->mElementProperty == nsGkAtoms::transitionsProperty ?
|
||||
eRestyle_Self : eRestyle_Subtree;
|
||||
mPresContext->PresShell()->RestyleForAnimation(et->mElement, hint);
|
||||
et->PostRestyleForAnimation(mPresContext);
|
||||
} else {
|
||||
didThrottle = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user