зеркало из https://github.com/mozilla/gecko-dev.git
Bug 816343. Remove nsIDOMNodeSelector. r=smaug
This commit is contained in:
Родитель
e5a1a7564c
Коммит
77bebdc268
|
@ -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<nsINode*>(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<nsINode> mNode;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsINode, NS_INODE_IID)
|
||||
|
||||
#define NS_FORWARD_NSIDOMNODE_TO_NSINODE_HELPER(...) \
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -33,7 +33,6 @@ function HTML_TAG(aTagName, aImplClass) {
|
|||
interfaces[aTagName] =
|
||||
[ "nsIDOMEventTarget",
|
||||
"nsIDOMElementCSSInlineStyle",
|
||||
"nsIDOMNodeSelector",
|
||||
"nsITouchEventReceiver",
|
||||
"nsIInlineEventHandlers" ];
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ XPIDL_SOURCES += [
|
|||
'nsIDOMNSEditableElement.idl',
|
||||
'nsIDOMNode.idl',
|
||||
'nsIDOMNodeList.idl',
|
||||
'nsIDOMNodeSelector.idl',
|
||||
'nsIDOMProcessingInstruction.idl',
|
||||
'nsIDOMText.idl',
|
||||
'nsIDOMUserDataHandler.idl',
|
||||
|
|
|
@ -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
|
||||
* <http://dev.w3.org/2006/webapi/selectors-api/>
|
||||
*/
|
||||
[scriptable, uuid(7cebc153-168a-416c-ba5a-56a8c2ddb2ec)]
|
||||
interface nsIDOMNodeSelector : nsISupports
|
||||
{
|
||||
nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
|
||||
nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors);
|
||||
};
|
Загрузка…
Ссылка в новой задаче