Bug 960465 patch 21 - Replace one use of nsRestyleHint_ChangeAnimationPhase with nsRestyleHint_AllHintsWithAnimations so that we can remove the rest. r=birtles

This commit is contained in:
L. David Baron 2015-02-17 11:15:06 +13:00
parent 04535c3f75
commit 8c28244fab
4 changed files with 10 additions and 7 deletions

View File

@ -374,6 +374,12 @@ enum nsRestyleHint {
// eRestyle_Subtree, which makes us rerun selector matching on all
// descendants rather than just continuing the restyling process.
eRestyle_ForceDescendants = (1<<10),
// Useful unions:
eRestyle_AllHintsWithAnimations = eRestyle_CSSTransitions |
eRestyle_CSSAnimations |
eRestyle_SVGAttrAnimations |
eRestyle_StyleAttribute,
};
// The functions below need an integral type to cast to to avoid

View File

@ -582,7 +582,7 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext,
if (!styleWithoutAnimation) {
styleWithoutAnimation = mPresContext->StyleSet()->
ResolveStyleWithoutAnimation(aTarget, aStyleContext,
eRestyle_ChangeAnimationPhase);
eRestyle_AllHintsWithAnimations);
}
interpolated = interpolated &&
BuildSegment(propData.mSegments, prop, src,
@ -601,7 +601,7 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext,
if (!styleWithoutAnimation) {
styleWithoutAnimation = mPresContext->StyleSet()->
ResolveStyleWithoutAnimation(aTarget, aStyleContext,
eRestyle_ChangeAnimationPhase);
eRestyle_AllHintsWithAnimations);
}
interpolated = interpolated &&
BuildSegment(propData.mSegments, prop, src,

View File

@ -1422,10 +1422,7 @@ nsStyleSet::RuleNodeWithReplacement(Element* aElement,
// are in these four levels.
if (aReplacements & (eRestyle_ChangeAnimationPhase |
eRestyle_ChangeAnimationPhaseDescendants)) {
aReplacements |= eRestyle_CSSTransitions |
eRestyle_CSSAnimations |
eRestyle_SVGAttrAnimations |
eRestyle_StyleAttribute;
aReplacements |= eRestyle_AllHintsWithAnimations;
}
// FIXME (perf): This should probably not rebuild the whole path, but

View File

@ -149,7 +149,7 @@ class nsStyleSet
// Resolve style by returning a style context with the specified
// animation data removed. It is allowable to remove all animation
// data with eRestyle_ChangeAnimationPhase, or by using any other
// data with eRestyle_AllHintsWithAnimations, or by using any other
// hints that are allowed by ResolveStyleWithReplacement.
already_AddRefed<nsStyleContext>
ResolveStyleWithoutAnimation(mozilla::dom::Element* aElement,