Bug 242046 Make the JS status handler a property of the XUL window, should speed up calls to set window.status r=jag sr=jst moa=mscott
git-svn-id: svn://10.0.0.236/trunk@161101 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -57,7 +57,6 @@
|
||||
#include "nsIAuthPrompt.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
#include "nsIXULBrowserWindow.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
||||
// Needed for nsIDocument::FlushPendingNotifications(...)
|
||||
#include "nsIDOMDocument.h"
|
||||
@@ -355,15 +354,8 @@ nsContentTreeOwner::GetPersistence(PRBool* aPersistPosition,
|
||||
|
||||
NS_IMETHODIMP nsContentTreeOwner::SetStatus(PRUint32 aStatusType, const PRUnichar* aStatus)
|
||||
{
|
||||
nsCOMPtr<nsIDOMWindowInternal> domWindow;
|
||||
mXULWindow->GetWindowDOMWindow(getter_AddRefs(domWindow));
|
||||
nsCOMPtr<nsPIDOMWindow> piDOMWindow(do_QueryInterface(domWindow));
|
||||
if(!piDOMWindow)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsISupports> xpConnectObj;
|
||||
piDOMWindow->GetObjectProperty(NS_LITERAL_STRING("XULBrowserWindow").get(), getter_AddRefs(xpConnectObj));
|
||||
nsCOMPtr<nsIXULBrowserWindow> xulBrowserWindow(do_QueryInterface(xpConnectObj));
|
||||
nsCOMPtr<nsIXULBrowserWindow> xulBrowserWindow;
|
||||
mXULWindow->GetXULBrowserWindow(getter_AddRefs(xulBrowserWindow));
|
||||
|
||||
if (xulBrowserWindow)
|
||||
{
|
||||
@@ -389,9 +381,11 @@ NS_IMETHODIMP nsContentTreeOwner::SetStatus(PRUint32 aStatusType, const PRUnicha
|
||||
// force the flushing...
|
||||
//
|
||||
// XXXbz no, this is nasty because we're flushing at all!
|
||||
nsCOMPtr<nsIDOMWindowInternal> domWindow;
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
|
||||
mXULWindow->GetWindowDOMWindow(getter_AddRefs(domWindow));
|
||||
domWindow->GetDocument(getter_AddRefs(domDoc));
|
||||
doc = do_QueryInterface(domDoc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user