Deal with lingering leaf content properly during append reflow

git-svn-id: svn://10.0.0.236/trunk@5716 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1998-07-16 18:19:53 +00:00
parent 4557a59f98
commit cf157da228
2 changed files with 20 additions and 36 deletions

View File

@@ -951,30 +951,22 @@ void HTMLContentSink::StartLayout()
void HTMLContentSink::ReflowNewContent()
{
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsIPresShell* shell = mDocument->GetShellAt(i);
if (nsnull != shell) {
nsIPresContext* cx = shell->GetPresContext();
nsRect r;
cx->GetVisibleArea(r);
shell->ResizeReflow(r.width, r.height);
NS_RELEASE(cx);
NS_RELEASE(shell);
}
}
#if XXX
printf("reflow body\n");
// Trigger reflows in each of the presentation shells
#if 0
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsIPresShell* shell = mDocument->GetShellAt(i);
if (nsnull != shell) {
shell->ContentAppended(mBody);
nsIPresContext* cx = shell->GetPresContext();
nsRect r;
cx->GetVisibleArea(r);
shell->ResizeReflow(r.width, r.height);
NS_RELEASE(cx);
NS_RELEASE(shell);
}
}
}
#else
// Trigger reflows in each of the presentation shells
mDocument->ContentAppended(mBody);
#endif
}