Flush out layout when someone asks how big we are. Bug 344861, r+sr=jst

git-svn-id: svn://10.0.0.236/trunk@203323 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-07-21 00:46:17 +00:00
parent 5aa42c500b
commit 19ee511bc7

View File

@@ -3703,6 +3703,14 @@ NS_IMETHODIMP
nsDocShell::GetPositionAndSize(PRInt32 * x, PRInt32 * y, PRInt32 * cx,
PRInt32 * cy)
{
// We should really consider just getting this information from
// our window instead of duplicating the storage and code...
nsCOMPtr<nsIDOMDocument> document(do_GetInterface(GetAsSupports(mParent)));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(document));
if (doc) {
doc->FlushPendingNotifications(Flush_Layout);
}
if (x)
*x = mBounds.x;
if (y)