bug #97227 (r=valeski, sr=vidur). This patch makes all calls to nsIWebBrowserChrome::SetStatus(...) display synchronously.

git-svn-id: svn://10.0.0.236/trunk@102039 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rpotts%netscape.com
2001-08-30 21:47:45 +00:00
parent 2bf4000b2e
commit 3d787fbce9
26 changed files with 81 additions and 40 deletions

View File

@@ -40,6 +40,10 @@
#include "nsIXULBrowserWindow.h"
#include "nsPIDOMWindow.h"
// Needed for nsIDocument::FlushPendingNotifications(...)
#include "nsIDOMDocument.h"
#include "nsIDocument.h"
// CIDs
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
@@ -338,7 +342,24 @@ NS_IMETHODIMP nsContentTreeOwner::SetStatus(PRUint32 aStatusType, const PRUnicha
}
}
return NS_OK;
//
// Force pending notifications to be processed immediately... This
// causes the status message to be displayed synchronously.
//
// XXX: This is nasty because we have to drill down to the nsIDocument to
// force the flushing...
//
nsCOMPtr<nsIDOMDocument> domDoc;
nsCOMPtr<nsIDocument> doc;
domWindow->GetDocument(getter_AddRefs(domDoc));
doc = do_QueryInterface(domDoc);
if (doc) {
doc->FlushPendingNotifications(PR_TRUE, PR_TRUE);
}
return NS_OK;
}
NS_IMETHODIMP nsContentTreeOwner::SetWebBrowser(nsIWebBrowser* aWebBrowser)