From 19ee511bc7c1f114dd3d4b699705cfce5d0e9de4 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Fri, 21 Jul 2006 00:46:17 +0000 Subject: [PATCH] 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 --- mozilla/docshell/base/nsDocShell.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index f8310f29d48..eecc9dfe4f3 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -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 document(do_GetInterface(GetAsSupports(mParent))); + nsCOMPtr doc(do_QueryInterface(document)); + if (doc) { + doc->FlushPendingNotifications(Flush_Layout); + } + if (x) *x = mBounds.x; if (y)