mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 450977 Remove deprecated nsIDOMChromeWindow.title r+sr=jst
This commit is contained in:
parent
5e5814d2b9
commit
ffaf57edf3
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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<nsIConsoleService> 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<nsIDOMNSDocument> 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<nsIDOMNSDocument> nsdoc(do_QueryInterface(mDocument, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return nsdoc->SetTitle(aTitle);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalChromeWindow::GetWindowState(PRUint16* aWindowState)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user