mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1115812 patch 9 - Move the end part of the rebuild-all process to RestyleManager::EndProcessingRestyles. r=heycam
This moves the code that finishes the rebuild-all process into EndProcessingRestyles(), which is part of the main restyling codepath. Patch 7 ensures that we'll always get to EndProcessingRestyles in this case, when we're going through the normal ProcessPendingRestyles() codepath rather than the special DoRebuildAllStyleData() codepath (which will be removed later in this patch series).
This commit is contained in:
parent
cc5b8767c2
commit
56aa82f688
@ -1582,17 +1582,21 @@ RestyleManager::DoRebuildAllStyleData(RestyleTracker& aRestyleTracker)
|
||||
changeHint, aRestyleTracker, restyleHint);
|
||||
|
||||
EndProcessingRestyles();
|
||||
}
|
||||
|
||||
if (mInRebuildAllStyleData) {
|
||||
// Tell the style set it's safe to destroy the old rule tree. We
|
||||
// must do this after the ProcessRestyledFrames call in case the
|
||||
// change list has frame reconstructs in it (since frames to be
|
||||
// reconstructed will still have their old style context pointers
|
||||
// until they are destroyed).
|
||||
mPresContext->StyleSet()->EndReconstruct();
|
||||
void
|
||||
RestyleManager::FinishRebuildAllStyleData()
|
||||
{
|
||||
MOZ_ASSERT(mInRebuildAllStyleData, "bad caller");
|
||||
|
||||
mInRebuildAllStyleData = false;
|
||||
}
|
||||
// Tell the style set it's safe to destroy the old rule tree. We
|
||||
// must do this after the ProcessRestyledFrames call in case the
|
||||
// change list has frame reconstructs in it (since frames to be
|
||||
// reconstructed will still have their old style context pointers
|
||||
// until they are destroyed).
|
||||
mPresContext->StyleSet()->EndReconstruct();
|
||||
|
||||
mInRebuildAllStyleData = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1694,6 +1698,10 @@ RestyleManager::EndProcessingRestyles()
|
||||
// add more restyles.
|
||||
mInStyleRefresh = false;
|
||||
|
||||
if (mInRebuildAllStyleData) {
|
||||
FinishRebuildAllStyleData();
|
||||
}
|
||||
|
||||
mPresContext->FrameConstructor()->EndUpdate();
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -453,6 +453,8 @@ private:
|
||||
RestyleTracker& aRestyleTracker,
|
||||
nsRestyleHint aRestyleHint);
|
||||
|
||||
void FinishRebuildAllStyleData();
|
||||
|
||||
void StyleChangeReflow(nsIFrame* aFrame, nsChangeHint aHint);
|
||||
|
||||
// Recursively add all the given frame and all children to the tracker.
|
||||
|
Loading…
Reference in New Issue
Block a user