mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Tweaking core document classname to make my last patch actually do the right thin in all cases.
This commit is contained in:
parent
c9558281fc
commit
bb50d2d065
@ -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)
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user