Move mStyleRule and mStyleRuleRefreshTime from ElementAnimations/ElementTransitions to CommonElementAnimationData, no bug, r=dbaron over irc

This commit is contained in:
David Zbarsky 2012-08-21 21:48:47 -04:00
parent bd4bdc3b0a
commit 5c1df7f323
3 changed files with 11 additions and 20 deletions

View File

@ -164,6 +164,17 @@ struct CommonElementAnimationData : public PRCList
CommonAnimationManager *mManager;
// This style rule contains the style data for currently animating
// values. It only matches when styling with animation. When we
// style without animation, we need to not use it so that we can
// detect any new changes; if necessary we restyle immediately
// afterwards with animation.
// NOTE: If we don't need to apply any styles, mStyleRule will be
// null, but mStyleRuleRefreshTime will still be valid.
nsRefPtr<mozilla::css::AnimValuesStyleRule> mStyleRule;
// The refresh time associated with mStyleRule.
TimeStamp mStyleRuleRefreshTime;
#ifdef DEBUG
bool mCalledPropertyDtor;
#endif

View File

@ -153,16 +153,6 @@ struct ElementAnimations : public mozilla::css::CommonElementAnimationData
// True if this animation can be performed on the compositor thread.
bool CanPerformOnCompositorThread() const;
bool HasAnimationOfProperty(nsCSSProperty aProperty) const;
// This style rule contains the style data for currently animating
// values. It only matches when styling with animation. When we
// style without animation, we need to not use it so that we can
// detect any new changes; if necessary we restyle immediately
// afterwards with animation.
// NOTE: If we don't need to apply any styles, mStyleRule will be
// null, but mStyleRuleRefreshTime will still be valid.
nsRefPtr<mozilla::css::AnimValuesStyleRule> mStyleRule;
// The refresh time associated with mStyleRule.
TimeStamp mStyleRuleRefreshTime;
// False when we know that our current style rule is valid
// indefinitely into the future (because all of our animations are

View File

@ -81,16 +81,6 @@ struct ElementTransitions : public mozilla::css::CommonElementAnimationData
bool CanPerformOnCompositorThread() const;
// Either zero or one for each CSS property:
nsTArray<ElementPropertyTransition> mPropertyTransitions;
// This style rule overrides style data with the currently
// transitioning value for an element that is executing a transition.
// It only matches when styling with animation. When we style without
// animation, we need to not use it so that we can detect any new
// changes; if necessary we restyle immediately afterwards with
// animation.
nsRefPtr<mozilla::css::AnimValuesStyleRule> mStyleRule;
// The refresh time associated with mStyleRule.
mozilla::TimeStamp mStyleRuleRefreshTime;
};