Tweaking core document classname to make my last patch actually do the right thin in all cases.

This commit is contained in:
jst%netscape.com 2001-09-21 03:23:33 +00:00
parent c9558281fc
commit bb50d2d065
6 changed files with 4 additions and 32 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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,

View File

@ -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)

View File

@ -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<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(mDocShell));
docShellAsItem->GetItemType(&type);
if(type == nsIDocShellTreeItem::typeChrome) {
nsCOMPtr<nsIBaseWindow> docShellAsWin(do_QueryInterface(mDocShell));
if(docShellAsWin) {
docShellAsWin->SetTitle(PromiseFlatString(mTitle).get());
}
}
}
return NS_OK;
}
NS_IMETHODIMP GlobalWindowImpl::GetInnerWidth(PRInt32* aInnerWidth)
{
FlushPendingNotifications();

View File

@ -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