From ffaf57edf3c0366411e1d57afcfee824d0355855 Mon Sep 17 00:00:00 2001 From: Neil Rashbrook Date: Tue, 19 Aug 2008 13:52:40 +0100 Subject: [PATCH] Bug 450977 Remove deprecated nsIDOMChromeWindow.title r+sr=jst --- dom/public/idl/base/nsIDOMChromeWindow.idl | 3 +-- dom/src/base/nsGlobalWindow.cpp | 31 ---------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/dom/public/idl/base/nsIDOMChromeWindow.idl b/dom/public/idl/base/nsIDOMChromeWindow.idl index 4dc957f14d9..f7372abafa6 100644 --- a/dom/public/idl/base/nsIDOMChromeWindow.idl +++ b/dom/public/idl/base/nsIDOMChromeWindow.idl @@ -40,14 +40,13 @@ interface nsIBrowserDOMWindow; -[scriptable, uuid(847fac33-48a8-4360-bfbc-6bb96245404d)] +[scriptable, uuid(77a20f5a-68ad-41d3-97ac-6ff721512908)] interface nsIDOMChromeWindow : nsISupports { const unsigned short STATE_MAXIMIZED = 1; const unsigned short STATE_MINIMIZED = 2; const unsigned short STATE_NORMAL = 3; - attribute DOMString title; readonly attribute unsigned short windowState; /** diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 7cca25dafac..e2a4a9d0aea 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -8737,37 +8737,6 @@ NS_INTERFACE_MAP_END_INHERITING(nsGlobalWindow) NS_IMPL_ADDREF_INHERITED(nsGlobalChromeWindow, nsGlobalWindow) NS_IMPL_RELEASE_INHERITED(nsGlobalChromeWindow, nsGlobalWindow) -static void TitleConsoleWarning() -{ - nsCOMPtr console(do_GetService("@mozilla.org/consoleservice;1")); - if (console) - console->LogStringMessage(NS_LITERAL_STRING("Deprecated property window.title used. Please use document.title instead.").get()); -} - -NS_IMETHODIMP -nsGlobalChromeWindow::GetTitle(nsAString& aTitle) -{ - NS_ERROR("nsIDOMChromeWindow::GetTitle is deprecated, use nsIDOMNSDocument instead"); - TitleConsoleWarning(); - - nsresult rv; - nsCOMPtr nsdoc(do_QueryInterface(mDocument, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - return nsdoc->GetTitle(aTitle); -} - -NS_IMETHODIMP -nsGlobalChromeWindow::SetTitle(const nsAString& aTitle) -{ - NS_ERROR("nsIDOMChromeWindow::SetTitle is deprecated, use nsIDOMNSDocument instead"); - TitleConsoleWarning(); - - nsresult rv; - nsCOMPtr nsdoc(do_QueryInterface(mDocument, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - return nsdoc->SetTitle(aTitle); -} - NS_IMETHODIMP nsGlobalChromeWindow::GetWindowState(PRUint16* aWindowState) {