mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 00:11:44 +00:00
Backing out part of last checkin that wasn't supposed to be checked in.
This commit is contained in:
parent
3610e1ce49
commit
fcbfe8e3e8
@ -78,6 +78,7 @@ 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;
|
||||
|
@ -1130,6 +1130,32 @@ 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,6 +252,7 @@ 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