Bug 960465 patch 22 - Remove implementation of nsRestyleHint_ChangeAnimationPhase. r=birtles

This commit is contained in:
L. David Baron 2015-02-17 11:15:06 +13:00
Родитель 8c28244fab
Коммит 43c2cd3af5
3 изменённых файлов: 3 добавлений и 39 удалений

Просмотреть файл

@ -1805,7 +1805,6 @@ RestyleManager::PostRestyleEvent(Element* aElement,
// separate eRestyle_StyleAttribute hints, one for animations and one
// for other things.
if (aRestyleHint & ~(eRestyle_CSSTransitions | eRestyle_CSSAnimations |
eRestyle_ChangeAnimationPhase |
eRestyle_SVGAttrAnimations)) {
mHavePendingNonAnimationRestyles = true;
}
@ -2724,11 +2723,9 @@ ElementRestyler::Restyle(nsRestyleHint aRestyleHint)
// If we are restyling this frame with eRestyle_Self or weaker hints,
// we restyle children with nsRestyleHint(0). But we pass the
// eRestyle_ChangeAnimationPhaseDescendants and eRestyle_ForceDescendants
// flags down too.
// eRestyle_ForceDescendants flag down too.
nsRestyleHint childRestyleHint =
nsRestyleHint(aRestyleHint & (eRestyle_Subtree |
eRestyle_ChangeAnimationPhaseDescendants |
eRestyle_ForceDescendants));
nsRefPtr<nsStyleContext> oldContext = mFrame->StyleContext();
@ -4096,8 +4093,6 @@ RestyleManager::RestyleHintToString(nsRestyleHint aHint)
bool any = false;
const char* names[] = { "Self", "Subtree", "LaterSiblings", "CSSTransitions",
"CSSAnimations", "SVGAttrAnimations", "StyleAttribute",
"ChangeAnimationPhase",
"ChangeAnimationPhaseDescendants",
"Force", "ForceDescendants" };
uint32_t hint = aHint & ((1 << ArrayLength(names)) - 1);
uint32_t rest = aHint & ~((1 << ArrayLength(names)) - 1);

Просмотреть файл

@ -350,30 +350,16 @@ enum nsRestyleHint {
// eRestyle_Self.
eRestyle_StyleAttribute = (1<<6),
// Additional restyle hint to be used along with CSSTransitions,
// CSSAnimations, SVGAttrAnimations, or StyleAttribute. This
// indicates that along with the replacement given, appropriate
// switching between the style with animation and style without
// animation should be performed by adding or removing rules that
// should be present only in the style with animation.
// This is implied by eRestyle_Self or eRestyle_Subtree.
// FIXME: Remove this as part of bug 960465.
eRestyle_ChangeAnimationPhase = (1 << 7),
// Same as the previous, except this applies to the entire subtree.
// FIXME: Remove this as part of bug 960465.
eRestyle_ChangeAnimationPhaseDescendants = (1 << 8),
// Continue the restyling process to the current frame's children even
// if this frame's restyling resulted in no style changes.
eRestyle_Force = (1<<9),
eRestyle_Force = (1<<7),
// Continue the restyling process to all of the current frame's
// descendants, even if any frame's restyling resulted in no style
// changes. (Implies eRestyle_Force.) Note that this is weaker than
// eRestyle_Subtree, which makes us rerun selector matching on all
// descendants rather than just continuing the restyling process.
eRestyle_ForceDescendants = (1<<10),
eRestyle_ForceDescendants = (1<<8),
// Useful unions:
eRestyle_AllHintsWithAnimations = eRestyle_CSSTransitions |

Просмотреть файл

@ -1409,8 +1409,6 @@ nsStyleSet::RuleNodeWithReplacement(Element* aElement,
eRestyle_CSSAnimations |
eRestyle_SVGAttrAnimations |
eRestyle_StyleAttribute |
eRestyle_ChangeAnimationPhase |
eRestyle_ChangeAnimationPhaseDescendants |
eRestyle_Force |
eRestyle_ForceDescendants)),
// FIXME: Once bug 979133 lands we'll have a better
@ -1418,13 +1416,6 @@ nsStyleSet::RuleNodeWithReplacement(Element* aElement,
nsPrintfCString("unexpected replacement bits 0x%" PRIX32,
uint32_t(aReplacements)).get());
// If we're changing animation phase, we have to reconsider what rules
// are in these four levels.
if (aReplacements & (eRestyle_ChangeAnimationPhase |
eRestyle_ChangeAnimationPhaseDescendants)) {
aReplacements |= eRestyle_AllHintsWithAnimations;
}
// FIXME (perf): This should probably not rebuild the whole path, but
// only the path from the last change in the rule tree, like
// ReplaceAnimationRule in nsStyleSet.cpp does. (That could then
@ -1487,10 +1478,6 @@ nsStyleSet::RuleNodeWithReplacement(Element* aElement,
break;
}
case eRestyle_SVGAttrAnimations: {
MOZ_ASSERT(aReplacements & (eRestyle_ChangeAnimationPhase |
eRestyle_ChangeAnimationPhaseDescendants),
"don't know how to do this level without phase change");
SVGAttrAnimationRuleProcessor* ruleProcessor =
static_cast<SVGAttrAnimationRuleProcessor*>(
mRuleProcessors[eSVGAttrAnimationSheet].get());
@ -1501,10 +1488,6 @@ nsStyleSet::RuleNodeWithReplacement(Element* aElement,
break;
}
case eRestyle_StyleAttribute: {
MOZ_ASSERT(aReplacements & (eRestyle_ChangeAnimationPhase |
eRestyle_ChangeAnimationPhaseDescendants),
"don't know how to do this level without phase change");
if (!level->mIsImportant) {
// First time through, we handle the non-!important rule.
nsHTMLCSSStyleSheet* ruleProcessor =