зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1075137 patch 5 - Add new boolean to RestyleManager for whether we're currently processing animation restyles. r=birtles
This is just moving one bit of data from the pres context without any logic change. But given the other refactoring, it seems to make more sense here now.
This commit is contained in:
Родитель
9e7caa1603
Коммит
313d94e669
|
@ -66,6 +66,7 @@ RestyleManager::RestyleManager(nsPresContext* aPresContext)
|
|||
, mInStyleRefresh(false)
|
||||
, mSkipAnimationRules(false)
|
||||
, mPostAnimationRestyles(false)
|
||||
, mIsProcessingAnimationStyleChange(false)
|
||||
, mHoverGeneration(0)
|
||||
, mRebuildAllExtraHint(nsChangeHint(0))
|
||||
, mLastUpdateForThrottledAnimations(aPresContext->RefreshDriver()->
|
||||
|
@ -1575,7 +1576,11 @@ RestyleManager::ProcessPendingRestyles()
|
|||
// the running transition so it can check for a new change on the same
|
||||
// property, and then posts an immediate animation style change).
|
||||
mPresContext->SetProcessingAnimationStyleChange(true);
|
||||
MOZ_ASSERT(!mIsProcessingAnimationStyleChange, "nesting forbidden");
|
||||
mIsProcessingAnimationStyleChange = true;
|
||||
mPendingAnimationRestyles.ProcessRestyles();
|
||||
MOZ_ASSERT(mIsProcessingAnimationStyleChange, "nesting forbidden");
|
||||
mIsProcessingAnimationStyleChange = false;
|
||||
mPresContext->SetProcessingAnimationStyleChange(false);
|
||||
|
||||
mPresContext->SetProcessingRestyles(false);
|
||||
|
|
|
@ -108,6 +108,12 @@ public:
|
|||
return mPostAnimationRestyles;
|
||||
}
|
||||
|
||||
// Whether we're currently in the animation phase of restyle
|
||||
// processing (to be eliminated in bug 960465)
|
||||
bool IsProcessingAnimationStyleChange() const {
|
||||
return mIsProcessingAnimationStyleChange;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reparent the style contexts of this frame subtree. The parent frame of
|
||||
* aFrame must be changed to the new parent before this function is called;
|
||||
|
@ -449,6 +455,9 @@ private:
|
|||
// styles associated with animation. Only true when
|
||||
// mSkipAnimationRules is also true.
|
||||
bool mPostAnimationRestyles : 1;
|
||||
// Whether we're currently in the animation phase of restyle
|
||||
// processing (to be eliminated in bug 960465)
|
||||
bool mIsProcessingAnimationStyleChange : 1;
|
||||
|
||||
uint32_t mHoverGeneration;
|
||||
nsChangeHint mRebuildAllExtraHint;
|
||||
|
|
Загрузка…
Ссылка в новой задаче