mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1437300 - Remove nsIDocCharset. r=bz
MozReview-Commit-ID: Ldl4utK3JKr --HG-- extra : rebase_source : 7009469dd13e16d43fcdba7549ad88ccf3eb3552
This commit is contained in:
parent
8fe6732ec1
commit
1bc4558c83
@ -40,7 +40,6 @@ XPIDL_SOURCES += [
|
||||
'nsIClipboardCommands.idl',
|
||||
'nsIContentViewer.idl',
|
||||
'nsIContentViewerEdit.idl',
|
||||
'nsIDocCharset.idl',
|
||||
'nsIDocShell.idl',
|
||||
'nsIDocShellLoadInfo.idl',
|
||||
'nsIDocShellTreeItem.idl',
|
||||
|
@ -518,7 +518,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDocShell)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIBaseWindow)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIScrollable)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITextScroll)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocCharset)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIRefreshURI)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIClipboardCommands.h"
|
||||
#include "nsIDeprecationWarner.h"
|
||||
#include "nsIDocCharset.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellLoadInfo.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
@ -125,7 +124,6 @@ class nsDocShell final
|
||||
, public nsIBaseWindow
|
||||
, public nsIScrollable
|
||||
, public nsITextScroll
|
||||
, public nsIDocCharset
|
||||
, public nsIRefreshURI
|
||||
, public nsIWebProgressListener
|
||||
, public nsIWebPageDescriptor
|
||||
@ -177,7 +175,6 @@ public:
|
||||
NS_DECL_NSIBASEWINDOW
|
||||
NS_DECL_NSISCROLLABLE
|
||||
NS_DECL_NSITEXTSCROLL
|
||||
NS_DECL_NSIDOCCHARSET
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSIWEBPROGRESSLISTENER
|
||||
NS_DECL_NSIREFRESHURI
|
||||
|
@ -1,19 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/**
|
||||
* The functionality of the nsIDocCharset interface has been incorporated into
|
||||
* nsIDocShell.
|
||||
*
|
||||
* This is an empty interface for backwards compatibility that will go away at
|
||||
* some point in the future
|
||||
*
|
||||
*/
|
||||
|
||||
[scriptable, uuid(c3faaf6e-40f0-11e1-95fc-6c626d69675c)]
|
||||
interface nsIDocCharset : nsISupports
|
||||
{};
|
@ -98,7 +98,6 @@ support-files = file_bug675587.html
|
||||
[test_bug691547.html]
|
||||
[test_bug694612.html]
|
||||
[test_bug703855.html]
|
||||
[test_bug713825.html]
|
||||
[test_bug728939.html]
|
||||
[test_bug797909.html]
|
||||
[test_bug1045096.html]
|
||||
|
@ -136,9 +136,6 @@ with Files('*640387*'):
|
||||
with Files('*668513*'):
|
||||
BUG_COMPONENT = ('Core', 'DOM')
|
||||
|
||||
with Files('*713825*'):
|
||||
BUG_COMPONENT = ('Core', 'Internationalization')
|
||||
|
||||
with Files('*797909*'):
|
||||
BUG_COMPONENT = ('Core', 'DOM: Core & HTML')
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=713825
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 713825</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=713825">Mozilla Bug 713825</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/**
|
||||
* Test for Bug 713825
|
||||
* test that nsIDocCharset still works backward compatibly
|
||||
*/
|
||||
var Ci = SpecialPowers.Ci;
|
||||
var docShell = SpecialPowers.wrap(window).QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIWebNavigation).
|
||||
QueryInterface(Ci.nsIDocShell);
|
||||
|
||||
var charset1 = docShell.charset;
|
||||
var charset2 = docShell.QueryInterface(Ci.nsIDocCharset).charset;
|
||||
var charset3 = SpecialPowers.wrap(window).QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDocCharset).charset;
|
||||
|
||||
/* if we get here without throwing and the three charsets are equal, all is OK */
|
||||
is(charset1, charset2, "QI'd nsIDocCharset.charset should equal nsIDocShell.charset");
|
||||
is(charset1, charset3, "getInterface'd nsIDocCharset.charset should equal nsIDocShell.charset");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -108,7 +108,6 @@
|
||||
#include "nsIDeviceSensors.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocCharset.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "Crypto.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -106,7 +106,6 @@
|
||||
#include "nsIDeviceSensors.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocCharset.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "Crypto.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
@ -6908,15 +6907,7 @@ nsGlobalWindowOuter::GetInterfaceInternal(const nsIID& aIID, void** aSink)
|
||||
NS_ENSURE_ARG_POINTER(aSink);
|
||||
*aSink = nullptr;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIDocCharset))) {
|
||||
nsGlobalWindowOuter* outer = GetOuterWindowInternal();
|
||||
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
NS_WARNING("Using deprecated nsIDocCharset: use nsIDocShell.GetCharset() instead ");
|
||||
nsCOMPtr<nsIDocCharset> docCharset(do_QueryInterface(outer->mDocShell));
|
||||
docCharset.forget(aSink);
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIWebNavigation))) {
|
||||
if (aIID.Equals(NS_GET_IID(nsIWebNavigation))) {
|
||||
nsGlobalWindowOuter* outer = GetOuterWindowInternal();
|
||||
NS_ENSURE_TRUE(outer, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user