diff --git a/content/base/public/nsINode.h b/content/base/public/nsINode.h index da9895466eb4..6c5f28733721 100644 --- a/content/base/public/nsINode.h +++ b/content/base/public/nsINode.h @@ -10,7 +10,6 @@ #include "nsCOMPtr.h" // for member, local #include "nsGkAtoms.h" // for nsGkAtoms::baseURIProperty #include "nsIDOMNode.h" -#include "nsIDOMNodeSelector.h" // base class #include "nsINodeInfo.h" // member (in nsCOMPtr) #include "nsIVariant.h" // for use in GetUserData() #include "nsNodeInfoManager.h" // for use in NodePrincipal() @@ -1761,29 +1760,6 @@ inline nsINode* NODE_FROM(C& aContent, D& aDocument) return static_cast(aDocument); } -/** - * A tearoff class for FragmentOrElement to implement NodeSelector - */ -class nsNodeSelectorTearoff MOZ_FINAL : public nsIDOMNodeSelector -{ -public: - NS_DECL_CYCLE_COLLECTING_ISUPPORTS - - NS_DECL_NSIDOMNODESELECTOR - - NS_DECL_CYCLE_COLLECTION_CLASS(nsNodeSelectorTearoff) - - nsNodeSelectorTearoff(nsINode *aNode) : mNode(aNode) - { - } - -private: - ~nsNodeSelectorTearoff() {} - -private: - nsCOMPtr mNode; -}; - NS_DEFINE_STATIC_IID_ACCESSOR(nsINode, NS_INODE_IID) #define NS_FORWARD_NSIDOMNODE_TO_NSINODE_HELPER(...) \ diff --git a/content/base/src/DocumentFragment.cpp b/content/base/src/DocumentFragment.cpp index a0be2eced18a..f0c8cdc34595 100644 --- a/content/base/src/DocumentFragment.cpp +++ b/content/base/src/DocumentFragment.cpp @@ -131,8 +131,6 @@ NS_INTERFACE_MAP_BEGIN(DocumentFragment) NS_INTERFACE_MAP_ENTRY(mozilla::dom::EventTarget) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsISupportsWeakReference, new nsNodeSupportsWeakRefTearoff(this)) - NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMNodeSelector, - new nsNodeSelectorTearoff(this)) // DOM bindings depend on the identity pointer being the // same as nsINode (which nsIContent inherits). NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContent) diff --git a/content/base/src/FragmentOrElement.cpp b/content/base/src/FragmentOrElement.cpp index 467e9b407a82..293de9a30f81 100644 --- a/content/base/src/FragmentOrElement.cpp +++ b/content/base/src/FragmentOrElement.cpp @@ -1691,8 +1691,6 @@ NS_INTERFACE_MAP_BEGIN(FragmentOrElement) NS_INTERFACE_MAP_ENTRY(mozilla::dom::EventTarget) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsISupportsWeakReference, new nsNodeSupportsWeakRefTearoff(this)) - NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMNodeSelector, - new nsNodeSelectorTearoff(this)) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMXPathNSResolver, new nsNode3Tearoff(this)) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsITouchEventReceiver, diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index f73ad50fa6d7..718dece765e1 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -1543,8 +1543,6 @@ NS_INTERFACE_TABLE_HEAD(nsDocument) NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsDocument) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMXPathNSResolver, new nsNode3Tearoff(this)) - NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMNodeSelector, - new nsNodeSelectorTearoff(this)) if (aIID.Equals(NS_GET_IID(nsIDOMXPathEvaluator)) || aIID.Equals(NS_GET_IID(nsIXPathEvaluatorInternal))) { if (!mXPathEvaluatorTearoff) { diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index 77e2c1a859d7..94ce56a935d1 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -25,7 +25,6 @@ #include "nsIScriptGlobalObject.h" #include "nsIContent.h" #include "nsEventListenerManager.h" -#include "nsIDOMNodeSelector.h" #include "nsIPrincipal.h" #include "nsIParser.h" #include "nsBindingManager.h" diff --git a/content/base/src/nsINode.cpp b/content/base/src/nsINode.cpp index d1e4f617e195..c536ffa8d8c0 100644 --- a/content/base/src/nsINode.cpp +++ b/content/base/src/nsINode.cpp @@ -2194,33 +2194,6 @@ nsINode::Length() const } } -NS_IMPL_CYCLE_COLLECTION_1(nsNodeSelectorTearoff, mNode) - -NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsNodeSelectorTearoff) - NS_INTERFACE_MAP_ENTRY(nsIDOMNodeSelector) -NS_INTERFACE_MAP_END_AGGREGATED(mNode) - -NS_IMPL_CYCLE_COLLECTING_ADDREF(nsNodeSelectorTearoff) -NS_IMPL_CYCLE_COLLECTING_RELEASE(nsNodeSelectorTearoff) - -NS_IMETHODIMP -nsNodeSelectorTearoff::QuerySelector(const nsAString& aSelector, - nsIDOMElement **aReturn) -{ - ErrorResult rv; - nsIContent* result = mNode->QuerySelector(aSelector, rv); - return result ? CallQueryInterface(result, aReturn) : rv.ErrorCode(); -} - -NS_IMETHODIMP -nsNodeSelectorTearoff::QuerySelectorAll(const nsAString& aSelector, - nsIDOMNodeList **aReturn) -{ - ErrorResult rv; - *aReturn = mNode->QuerySelectorAll(aSelector, rv).get(); - return rv.ErrorCode(); -} - // NOTE: The aPresContext pointer is NOT addrefed. // *aSelectorList might be null even if NS_OK is returned; this // happens when all the selectors were pseudo-element selectors. diff --git a/content/html/content/test/test_bug389797.html b/content/html/content/test/test_bug389797.html index b9a1ff540302..a87267090647 100644 --- a/content/html/content/test/test_bug389797.html +++ b/content/html/content/test/test_bug389797.html @@ -33,7 +33,6 @@ function HTML_TAG(aTagName, aImplClass) { interfaces[aTagName] = [ "nsIDOMEventTarget", "nsIDOMElementCSSInlineStyle", - "nsIDOMNodeSelector", "nsITouchEventReceiver", "nsIInlineEventHandlers" ]; diff --git a/dom/interfaces/core/moz.build b/dom/interfaces/core/moz.build index 10f6ed014322..1827f37716b0 100644 --- a/dom/interfaces/core/moz.build +++ b/dom/interfaces/core/moz.build @@ -20,7 +20,6 @@ XPIDL_SOURCES += [ 'nsIDOMNSEditableElement.idl', 'nsIDOMNode.idl', 'nsIDOMNodeList.idl', - 'nsIDOMNodeSelector.idl', 'nsIDOMProcessingInstruction.idl', 'nsIDOMText.idl', 'nsIDOMUserDataHandler.idl', diff --git a/dom/interfaces/core/nsIDOMNodeSelector.idl b/dom/interfaces/core/nsIDOMNodeSelector.idl deleted file mode 100644 index ea01f8509ced..000000000000 --- a/dom/interfaces/core/nsIDOMNodeSelector.idl +++ /dev/null @@ -1,20 +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" - -/** - * The nsIDOMNodeSelector interface is an interface for getting nodes - * that match a given CSS selector. - * - * For more information on this interface please see - * - */ -[scriptable, uuid(7cebc153-168a-416c-ba5a-56a8c2ddb2ec)] -interface nsIDOMNodeSelector : nsISupports -{ - nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors); - nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors); -};