Don't make embedding of a content viewer in a child frame force a layout flush

on the parent.  The child doesn't really care that much about up-to-date layout
info at this point; if its size changes it will deal.  Bug 379485, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@225491 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2007-05-02 20:34:41 +00:00
parent ca4af9114f
commit 462a42d337
2 changed files with 13 additions and 3 deletions

View File

@@ -3591,6 +3591,14 @@ nsDocShell::GetPositionAndSize(PRInt32 * x, PRInt32 * y, PRInt32 * cx,
doc->FlushPendingNotifications(Flush_Layout);
}
DoGetPositionAndSize(x, y, cx, cy);
return NS_OK;
}
void
nsDocShell::DoGetPositionAndSize(PRInt32 * x, PRInt32 * y, PRInt32 * cx,
PRInt32 * cy)
{
if (x)
*x = mBounds.x;
if (y)
@@ -3599,8 +3607,6 @@ nsDocShell::GetPositionAndSize(PRInt32 * x, PRInt32 * y, PRInt32 * cx,
*cx = mBounds.width;
if (cy)
*cy = mBounds.height;
return NS_OK;
}
NS_IMETHODIMP
@@ -5898,7 +5904,7 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
// This will get the size from the current content viewer or from the
// Init settings
GetPositionAndSize(&x, &y, &cx, &cy);
DoGetPositionAndSize(&x, &y, &cx, &cy);
nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
NS_ENSURE_SUCCESS(GetSameTypeParent(getter_AddRefs(parentAsItem)),