Don't make embedding of a content viewer in a child frame force a layout flushon the parent. The child doesn't really care that much about up-to-date layoutinfo at this point; if its size changes it will deal. Bug 379485, r+sr=jst
This commit is contained in:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user