From bb50d2d06515e974fb13408b851e4bdacea3f371 Mon Sep 17 00:00:00 2001 From: "jst%netscape.com" Date: Fri, 21 Sep 2001 03:23:33 +0000 Subject: [PATCH] Tweaking core document classname to make my last patch actually do the right thin in all cases. --- content/xml/document/src/nsXMLDocument.cpp | 2 +- dom/public/idl/base/nsIDOMWindowInternal.idl | 1 - dom/public/nsIDOMClassInfo.h | 2 +- dom/src/base/nsDOMClassInfo.cpp | 4 +-- dom/src/base/nsGlobalWindow.cpp | 26 -------------------- dom/src/base/nsGlobalWindow.h | 1 - 6 files changed, 4 insertions(+), 32 deletions(-) diff --git a/content/xml/document/src/nsXMLDocument.cpp b/content/xml/document/src/nsXMLDocument.cpp index d349c1e03ca8..7878c0c17e4d 100644 --- a/content/xml/document/src/nsXMLDocument.cpp +++ b/content/xml/document/src/nsXMLDocument.cpp @@ -211,7 +211,7 @@ NS_INTERFACE_MAP_BEGIN(nsXMLDocument) NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) NS_INTERFACE_MAP_ENTRY(nsIHttpEventSink) NS_INTERFACE_MAP_ENTRY(nsIDOMXMLDocument) - NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(Document) + NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(XMLDocument) NS_INTERFACE_MAP_END_INHERITING(nsDocument) diff --git a/dom/public/idl/base/nsIDOMWindowInternal.idl b/dom/public/idl/base/nsIDOMWindowInternal.idl index a7c1f75a45f9..c1dc37053ef2 100644 --- a/dom/public/idl/base/nsIDOMWindowInternal.idl +++ b/dom/public/idl/base/nsIDOMWindowInternal.idl @@ -78,7 +78,6 @@ interface nsIDOMWindowInternal : nsIDOMWindow // XXX: The setter that takes a string argument needs to be special // cased! readonly attribute nsIDOMLocation location; - attribute DOMString title; attribute long innerWidth; attribute long innerHeight; diff --git a/dom/public/nsIDOMClassInfo.h b/dom/public/nsIDOMClassInfo.h index fe466f612f27..4906784a18ef 100644 --- a/dom/public/nsIDOMClassInfo.h +++ b/dom/public/nsIDOMClassInfo.h @@ -41,7 +41,7 @@ enum nsDOMClassInfoID { eDOMClassInfo_Screen_id, // Core classes - eDOMClassInfo_Document_id, + eDOMClassInfo_XMLDocument_id, eDOMClassInfo_DocumentType_id, eDOMClassInfo_DOMImplementation_id, eDOMClassInfo_DocumentFragment_id, diff --git a/dom/src/base/nsDOMClassInfo.cpp b/dom/src/base/nsDOMClassInfo.cpp index 1dd9b8a52111..b2a7e1d907e6 100644 --- a/dom/src/base/nsDOMClassInfo.cpp +++ b/dom/src/base/nsDOMClassInfo.cpp @@ -380,7 +380,7 @@ static nsDOMClassInfoData sClassInfoData[] = { DOM_DEFAULT_SCRIPTABLE_FLAGS) // Core classes - NS_DEFINE_CLASSINFO_DATA(Document, nsDocumentSH, + NS_DEFINE_CLASSINFO_DATA(XMLDocument, nsDocumentSH, NODE_SCRIPTABLE_FLAGS | nsIXPCScriptable::WANT_ENUMERATE) NS_DEFINE_CLASSINFO_DATA(DocumentType, nsNodeSH, @@ -971,7 +971,7 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMScreen) DOM_CLASSINFO_MAP_END - DOM_CLASSINFO_MAP_BEGIN(Document, nsIDOMDocument) + DOM_CLASSINFO_MAP_BEGIN(XMLDocument, nsIDOMDocument) DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocument) DOM_CLASSINFO_MAP_ENTRY(nsIDOMXMLDocument) DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocument) diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 04dc307aba0a..7937d5ca4ba6 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -1130,32 +1130,6 @@ NS_IMETHODIMP GlobalWindowImpl::SetName(const nsAReadableString& aName) return result; } -NS_IMETHODIMP -GlobalWindowImpl::GetTitle(nsAWritableString& aTitle) -{ - aTitle = mTitle; - return NS_OK; -} - -NS_IMETHODIMP -GlobalWindowImpl::SetTitle(const nsAReadableString& aTitle) -{ - mTitle = aTitle; - if(mDocShell) { - // See if we're a chrome shell. - PRInt32 type; - nsCOMPtr docShellAsItem(do_QueryInterface(mDocShell)); - docShellAsItem->GetItemType(&type); - if(type == nsIDocShellTreeItem::typeChrome) { - nsCOMPtr docShellAsWin(do_QueryInterface(mDocShell)); - if(docShellAsWin) { - docShellAsWin->SetTitle(PromiseFlatString(mTitle).get()); - } - } - } - return NS_OK; -} - NS_IMETHODIMP GlobalWindowImpl::GetInnerWidth(PRInt32* aInnerWidth) { FlushPendingNotifications(); diff --git a/dom/src/base/nsGlobalWindow.h b/dom/src/base/nsGlobalWindow.h index 39852a913747..e760bd5c4353 100644 --- a/dom/src/base/nsGlobalWindow.h +++ b/dom/src/base/nsGlobalWindow.h @@ -252,7 +252,6 @@ protected: PRPackedBool mIsDocumentLoaded; // true between onload and onunload events nsString mStatus; nsString mDefaultStatus; - nsString mTitle; nsIScriptGlobalObjectOwner* mGlobalObjectOwner; // Weak Reference nsIDocShell* mDocShell; // Weak Reference