зеркало из https://github.com/mozilla/pjs.git
Bug 688044 - ASSERTION: Why is the root in mDirtyRoots already? r=bzbarsky
This commit is contained in:
Родитель
e2bf7053c4
Коммит
9f1931699d
|
@ -1962,18 +1962,19 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
|
|||
|
||||
NS_ASSERTION(rootFrame, "How did that happen?");
|
||||
|
||||
// Note: Because the frame just got created, it has the NS_FRAME_IS_DIRTY
|
||||
// bit set. Unset it so that FrameNeedsReflow() will work right.
|
||||
NS_ASSERTION(!mDirtyRoots.Contains(rootFrame),
|
||||
"Why is the root in mDirtyRoots already?");
|
||||
|
||||
rootFrame->RemoveStateBits(NS_FRAME_IS_DIRTY |
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
FrameNeedsReflow(rootFrame, eResize, NS_FRAME_IS_DIRTY);
|
||||
|
||||
NS_ASSERTION(mDirtyRoots.Contains(rootFrame),
|
||||
"Should be in mDirtyRoots now");
|
||||
NS_ASSERTION(mReflowScheduled, "Why no reflow scheduled?");
|
||||
// Note: when the frame was created above it had the NS_FRAME_IS_DIRTY bit
|
||||
// set, but XBL processing could have caused a reflow which clears it.
|
||||
if (NS_LIKELY(rootFrame->GetStateBits() & NS_FRAME_IS_DIRTY)) {
|
||||
// Unset the DIRTY bits so that FrameNeedsReflow() will work right.
|
||||
rootFrame->RemoveStateBits(NS_FRAME_IS_DIRTY |
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
NS_ASSERTION(!mDirtyRoots.Contains(rootFrame),
|
||||
"Why is the root in mDirtyRoots already?");
|
||||
FrameNeedsReflow(rootFrame, eResize, NS_FRAME_IS_DIRTY);
|
||||
NS_ASSERTION(mDirtyRoots.Contains(rootFrame),
|
||||
"Should be in mDirtyRoots now");
|
||||
NS_ASSERTION(mReflowScheduled, "Why no reflow scheduled?");
|
||||
}
|
||||
|
||||
// Restore our root scroll position now if we're getting here after EndLoad
|
||||
// got called, since this is our one chance to do it. Note that we need not
|
||||
|
|
Загрузка…
Ссылка в новой задаче