зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1363429 - Get rid of nsIDOMLocation, r=bz, r=honza, f=ochameau
This commit is contained in:
Родитель
d7205479b1
Коммит
83c815ee45
|
@ -1567,7 +1567,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
function ObjectWithURL({obj, hooks}, grip, rawObj) {
|
||||
if (isWorker || !rawObj || !(rawObj instanceof Ci.nsIDOMCSSImportRule ||
|
||||
rawObj instanceof Ci.nsIDOMCSSStyleSheet ||
|
||||
rawObj instanceof Ci.nsIDOMLocation ||
|
||||
obj.class == "Location" ||
|
||||
rawObj instanceof Ci.nsIDOMWindow)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -67,22 +67,10 @@ Location::~Location()
|
|||
// QueryInterface implementation for Location
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Location)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMLocation)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMLocation)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(Location)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Location)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mInnerWindow);
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Location)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mInnerWindow)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(Location)
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Location, mInnerWindow)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(Location)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(Location)
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "js/TypeDecls.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMLocation.h"
|
||||
#include "nsIWeakReferenceUtils.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsString.h"
|
||||
|
@ -27,15 +26,14 @@ namespace dom {
|
|||
// Location: Script "location" object
|
||||
//*****************************************************************************
|
||||
|
||||
class Location final : public nsIDOMLocation
|
||||
class Location final : public nsISupports
|
||||
, public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
Location(nsPIDOMWindowInner* aWindow, nsIDocShell *aDocShell);
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Location,
|
||||
nsIDOMLocation)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Location)
|
||||
|
||||
// WebIDL API:
|
||||
void Assign(const nsAString& aUrl,
|
||||
|
|
|
@ -233,7 +233,6 @@
|
|||
#include "nsIEditor.h"
|
||||
#include "nsIDOMCSSStyleRule.h"
|
||||
#include "mozilla/css/StyleRule.h"
|
||||
#include "nsIDOMLocation.h"
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsISecurityConsoleMessage.h"
|
||||
#include "nsCharSeparatedTokenizer.h"
|
||||
|
@ -6857,13 +6856,6 @@ nsDocument::GetDefaultView(mozIDOMWindowProxy** aDefaultView)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::GetLocation(nsIDOMLocation **_retval)
|
||||
{
|
||||
*_retval = nsIDocument::GetLocation().take();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<Location>
|
||||
nsIDocument::GetLocation() const
|
||||
{
|
||||
|
|
|
@ -23,7 +23,6 @@ XPIDL_SOURCES += [
|
|||
'nsIDOMCrypto.idl',
|
||||
'nsIDOMGlobalPropertyInitializer.idl',
|
||||
'nsIDOMHistory.idl',
|
||||
'nsIDOMLocation.idl',
|
||||
'nsIDOMModalContentWindow.idl',
|
||||
'nsIDOMNavigator.idl',
|
||||
'nsIDOMScreen.idl',
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(79de76e5-994e-4f6b-81aa-42d9adb6e67e)]
|
||||
interface nsIDOMLocation : nsISupports
|
||||
{
|
||||
// Empty interface. Location is defined using WebIDL.
|
||||
};
|
|
@ -18,7 +18,6 @@ interface mozIDOMWindowProxy;
|
|||
interface nsIDOMNodeIterator;
|
||||
interface nsIDOMNodeFilter;
|
||||
interface nsIDOMTreeWalker;
|
||||
interface nsIDOMLocation;
|
||||
|
||||
/**
|
||||
* The nsIDOMDocument interface represents the entire HTML or XML document.
|
||||
|
@ -117,11 +116,6 @@ interface nsIDOMDocument : nsIDOMNode
|
|||
*/
|
||||
attribute DOMString dir;
|
||||
|
||||
/**
|
||||
* @see <http://www.whatwg.org/html/#dom-document-location>
|
||||
*/
|
||||
readonly attribute nsIDOMLocation location;
|
||||
|
||||
/**
|
||||
* @see <http://www.whatwg.org/html/#document.title>
|
||||
*/
|
||||
|
|
|
@ -73,9 +73,6 @@ public:
|
|||
// nsIDocument version applies to us (it's shadowed by the XPCOM thing on
|
||||
// nsDocument).
|
||||
using nsIDocument::GetLocation;
|
||||
// But then we need to also pull in the nsDocument XPCOM version
|
||||
// because nsXULDocument tries to forward to it.
|
||||
using nsDocument::GetLocation;
|
||||
|
||||
protected:
|
||||
virtual ~XMLDocument();
|
||||
|
|
Загрузка…
Ссылка в новой задаче