mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
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:
parent
3e0134e2f5
commit
b2bf331b94
@ -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)),
|
||||
|
@ -475,6 +475,10 @@ protected:
|
||||
// Call BeginRestore(nsnull, PR_FALSE) for each child of this shell.
|
||||
nsresult BeginRestoreChildren();
|
||||
|
||||
// Method to get our current position and size without flushing
|
||||
void DoGetPositionAndSize(PRInt32 * x, PRInt32 * y, PRInt32 * cx,
|
||||
PRInt32 * cy);
|
||||
|
||||
// Check whether aURI should inherit our security context
|
||||
static nsresult URIInheritsSecurityContext(nsIURI* aURI, PRBool* aResult);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user