mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 996796 patch 2 - Change the public API to updating main-thread-suppressed animation styles (miniflush) in preparation for refactoring how it works. r=birtles
Later patches will combine the coalescing of restyling between the miniflush performed for animations and for transitions into a single RestyleTracker, which will coalesce the work better. This patch changes the API exposed for doing that so that the coalescing patch will contain only the internals.
This commit is contained in:
parent
50a5e634d3
commit
ff6cc13ca8
@ -1468,8 +1468,7 @@ RestyleManager::ProcessPendingRestyles()
|
||||
if (nsLayoutUtils::AreAsyncAnimationsEnabled() &&
|
||||
mPendingRestyles.Count() > 0) {
|
||||
++mAnimationGeneration;
|
||||
mPresContext->TransitionManager()->UpdateAllThrottledStyles();
|
||||
mPresContext->AnimationManager()->UpdateAllThrottledStyles();
|
||||
UpdateOnlyAnimationStyles();
|
||||
}
|
||||
|
||||
mPendingRestyles.ProcessRestyles();
|
||||
@ -1529,6 +1528,13 @@ RestyleManager::EndProcessingRestyles()
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
RestyleManager::UpdateOnlyAnimationStyles()
|
||||
{
|
||||
mPresContext->TransitionManager()->UpdateAllThrottledStyles();
|
||||
mPresContext->AnimationManager()->UpdateAllThrottledStyles();
|
||||
}
|
||||
|
||||
void
|
||||
RestyleManager::PostRestyleEventCommon(Element* aElement,
|
||||
nsRestyleHint aRestyleHint,
|
||||
|
@ -160,6 +160,12 @@ public:
|
||||
void BeginProcessingRestyles();
|
||||
void EndProcessingRestyles();
|
||||
|
||||
// Update styles for animations that are running on the compositor and
|
||||
// whose updating is suppressed on the main thread (to save
|
||||
// unnecessary work), while leaving all other aspects of style
|
||||
// out-of-date.
|
||||
void UpdateOnlyAnimationStyles();
|
||||
|
||||
// Rebuilds all style data by throwing out the old rule tree and
|
||||
// building a new one, and additionally applying aExtraHint (which
|
||||
// must not contain nsChangeHint_ReconstructFrame) to the root frame.
|
||||
|
@ -6689,8 +6689,7 @@ FlushThrottledStyles(nsIDocument *aDocument, void *aData)
|
||||
if (shell && shell->IsVisible()) {
|
||||
nsPresContext* presContext = shell->GetPresContext();
|
||||
if (presContext) {
|
||||
presContext->TransitionManager()->UpdateAllThrottledStyles();
|
||||
presContext->AnimationManager()->UpdateAllThrottledStyles();
|
||||
presContext->RestyleManager()->UpdateOnlyAnimationStyles();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user