Bug 1341987 - Part 4: Use nsIFrame's nsPresContext instead of getting from element. r?birtles
MozReview-Commit-ID: 3pWt7d2MKsZ
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -1355,23 +1355,17 @@ KeyframeEffectReadOnly::CanThrottleTrans
// If we know that the animation cannot cause overflow,
// we can just disable flushes for this animation.
// If we don't show scrollbars, we don't care about overflow.
if (LookAndFeel::GetInt(LookAndFeel::eIntID_ShowHideScrollbars) == 0) {
return true;
}
- nsPresContext* presContext = GetPresContext();
- // CanThrottleTransformChanges is only called as part of a refresh driver tick
- // in which case we expect to has a pres context.
- MOZ_ASSERT(presContext);
-
- TimeStamp now =
- presContext->RefreshDriver()->MostRecentRefresh();
+ TimeStamp now = aFrame.PresContext()->RefreshDriver()->MostRecentRefresh();
EffectSet* effectSet = EffectSet::GetEffectSet(mTarget->mElement,
mTarget->mPseudoType);
MOZ_ASSERT(effectSet, "CanThrottleTransformChanges is expected to be called"
" on an effect in an effect set");
MOZ_ASSERT(mAnimation, "CanThrottleTransformChanges is expected to be called"
" on an effect with a parent animation");
TimeStamp lastSyncTime = effectSet->LastTransformSyncTime();