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

This commit is contained in:
bzbarsky@mit.edu
2006-07-21 00:46:17 +00:00
parent 78e3c2b2ee
commit eef8315a3d

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)