Fix bug 399412 - don't reflow overflow containers that are pending re-placement. r+sr=roc

This commit is contained in:
fantasai 2009-05-08 18:53:44 -07:00
parent ab2848ec65
commit 1bf3a4031d
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<html>
<head>
<style id="s">
.container {
height: 30px;
}
</style>
<style>
.overflow {
height: 150px;
border: 1px silver solid;
}
body {
height: 60px;
width: 300px;
-moz-column-width: 50px;
-moz-column-gap: 1px;
}
</style>
</head>
<body onload="s=document.getElementById('s'); s.parentNode.removeChild(s);">
<div class="container"><div class="overflow"></div></div>
<div class="container"><div class="overflow"></div></div>
</body>
</html>

View File

@ -122,6 +122,7 @@ load 397852-1.xhtml
load 398181-1.html
load 398181-2.html
load 399407-1.xhtml
load 399412-1.html
load 399843-1.html
load 400223-1.html
load 400232-1.html

View File

@ -989,6 +989,11 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
nsOverflowContinuationTracker tracker(aPresContext, this, PR_FALSE, PR_FALSE);
for (nsIFrame* frame = overflowContainers->FirstChild(); frame;
frame = frame->GetNextSibling()) {
if (frame->GetPrevInFlow()->GetParent() != GetPrevInFlow()) {
// frame's prevInFlow has moved, skip reflowing this frame;
// it will get reflowed once it's been placed
continue;
}
if (NS_SUBTREE_DIRTY(frame)) {
// Get prev-in-flow
nsIFrame* prevInFlow = frame->GetPrevInFlow();