зеркало из https://github.com/mozilla/pjs.git
Fix bug 379229, r+sr=dbaron
This commit is contained in:
Родитель
6c75be2a96
Коммит
2d5fe3f3f1
|
@ -3213,6 +3213,35 @@ PresShell::EndLoad(nsIDocument *aDocument)
|
|||
mDocumentLoading = PR_FALSE;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
PresShell::VerifyHasDirtyRootAncestor(nsIFrame* aFrame)
|
||||
{
|
||||
// XXXbz due to bug 372769, can't actually assert anything here...
|
||||
return;
|
||||
|
||||
// XXXbz shouldn't need this part; remove it once FrameNeedsReflow
|
||||
// handles the root frame correctly.
|
||||
if (!aFrame->GetParent()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure that there is a reflow root ancestor of |aFrame| that's
|
||||
// in mDirtyRoots already.
|
||||
while (aFrame && (aFrame->GetStateBits() & NS_FRAME_HAS_DIRTY_CHILDREN)) {
|
||||
if (((aFrame->GetStateBits() & NS_FRAME_REFLOW_ROOT) ||
|
||||
!aFrame->GetParent()) &&
|
||||
mDirtyRoots.IndexOf(aFrame) != -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
aFrame = aFrame->GetParent();
|
||||
}
|
||||
NS_NOTREACHED("Frame has dirty bits set but isn't scheduled to be "
|
||||
"reflowed?");
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty)
|
||||
{
|
||||
|
@ -3301,6 +3330,12 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty)
|
|||
}
|
||||
mDirtyRoots.AppendElement(f);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else {
|
||||
VerifyHasDirtyRootAncestor(f);
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3313,6 +3348,9 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty)
|
|||
"ChildIsDirty didn't do its job");
|
||||
if (wasDirty) {
|
||||
// This frame was already marked dirty.
|
||||
#ifdef DEBUG
|
||||
VerifyHasDirtyRootAncestor(f);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ fails == 25888-3r.html 25888-3r-ref.html # bug 25888
|
|||
== 323656-3.html 323656-3-ref.html
|
||||
== 323656-4.html 323656-4-ref.html
|
||||
fails == 323656-5.svg 323656-5-ref.svg # bug 377584
|
||||
random == 323656-6.html 323656-6-ref.html # bug 379229
|
||||
== 323656-6.html 323656-6-ref.html
|
||||
== 325486-1.html 325486-1-ref.html
|
||||
random == 328829-1.xhtml 328829-1-ref.xhtml # bug 369046 (intermittent)
|
||||
== 328829-2.xhtml 328829-2-ref.xhtml
|
||||
|
|
|
@ -286,7 +286,7 @@ nsTableOuterFrame::AppendFrames(nsIAtom* aListName,
|
|||
// just tell the pres shell.
|
||||
AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(mCaptionFrame, nsIPresShell::eTreeChange);
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange);
|
||||
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -507,9 +507,11 @@ NS_IMETHODIMP nsImageBoxFrame::OnStartContainer(imgIRequest *request,
|
|||
mIntrinsicSize.SizeTo(nsPresContext::CSSPixelsToAppUnits(w),
|
||||
nsPresContext::CSSPixelsToAppUnits(h));
|
||||
|
||||
AddStateBits(NS_FRAME_IS_DIRTY);
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange);
|
||||
if (!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
AddStateBits(NS_FRAME_IS_DIRTY);
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eStyleChange);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче