mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1115812 patch 12 - Null-check the root frame in StartRebuildAllStyleData. r=heycam
In the new way of doing a rebuild-all, StartRebuildAllStyleData might be called directly from ProcessPendingRestyles rather than from RebuildAllStyleData (which null-checks the root frame) or from within processing restyles (which can only happen when there's a root frame). This means it needs its own null-check of the root frame.
This commit is contained in:
parent
b8e6ffef57
commit
504d9a46e0
@ -1533,6 +1533,12 @@ RestyleManager::StartRebuildAllStyleData(RestyleTracker& aRestyleTracker)
|
||||
{
|
||||
MOZ_ASSERT(mIsProcessingRestyles);
|
||||
|
||||
nsIFrame* rootFrame = mPresContext->PresShell()->GetRootFrame();
|
||||
if (!rootFrame) {
|
||||
// No need to do anything.
|
||||
return;
|
||||
}
|
||||
|
||||
mInRebuildAllStyleData = true;
|
||||
|
||||
// Tell the style set to get the old rule tree out of the way
|
||||
@ -1580,7 +1586,7 @@ RestyleManager::StartRebuildAllStyleData(RestyleTracker& aRestyleTracker)
|
||||
// XXX Does it matter that we're passing aExtraHint to the real root
|
||||
// frame and not the root node's primary frame? (We could do
|
||||
// roughly what we do for aRestyleHint above.)
|
||||
ComputeAndProcessStyleChange(mPresContext->PresShell()->GetRootFrame(),
|
||||
ComputeAndProcessStyleChange(rootFrame,
|
||||
changeHint, aRestyleTracker, restyleHint);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user