Bug 1029104 - Convert XPathExpression to WebIDL bindings, add WebIDL API and switch to the WebIDL binding. r=bz.
This commit is contained in:
@@ -51,7 +51,6 @@ class nsIDOMDocumentType;
|
||||
class nsIDOMElement;
|
||||
class nsIDOMNodeFilter;
|
||||
class nsIDOMNodeList;
|
||||
class nsIDOMXPathExpression;
|
||||
class nsIDOMXPathNSResolver;
|
||||
class nsIHTMLCollection;
|
||||
class nsILayoutHistoryState;
|
||||
@@ -122,6 +121,7 @@ class TouchList;
|
||||
class TreeWalker;
|
||||
class UndoManager;
|
||||
class XPathEvaluator;
|
||||
class XPathExpression;
|
||||
class XPathResult;
|
||||
template<typename> class OwningNonNull;
|
||||
template<typename> class Sequence;
|
||||
@@ -2269,7 +2269,7 @@ public:
|
||||
const nsAString& aAttrValue);
|
||||
Element* GetBindingParent(nsINode& aNode);
|
||||
void LoadBindingDocument(const nsAString& aURI, mozilla::ErrorResult& rv);
|
||||
already_AddRefed<nsIDOMXPathExpression>
|
||||
mozilla::dom::XPathExpression*
|
||||
CreateExpression(const nsAString& aExpression,
|
||||
nsIDOMXPathNSResolver* aResolver,
|
||||
mozilla::ErrorResult& rv);
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
#include "nsBidiUtils.h"
|
||||
|
||||
#include "nsIDOMUserDataHandler.h"
|
||||
#include "nsIDOMXPathExpression.h"
|
||||
#include "nsIDOMXPathNSResolver.h"
|
||||
#include "nsIParserService.h"
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
@@ -12041,7 +12040,7 @@ nsIDocument::Constructor(const GlobalObject& aGlobal,
|
||||
return doc.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMXPathExpression>
|
||||
XPathExpression*
|
||||
nsIDocument::CreateExpression(const nsAString& aExpression,
|
||||
nsIDOMXPathNSResolver* aResolver,
|
||||
ErrorResult& rv)
|
||||
@@ -12066,14 +12065,6 @@ nsIDocument::Evaluate(JSContext* aCx, const nsAString& aExpression,
|
||||
aType, aResult, rv);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::CreateExpression(const nsAString& aExpression,
|
||||
nsIDOMXPathNSResolver* aResolver,
|
||||
nsIDOMXPathExpression** aResult)
|
||||
{
|
||||
return XPathEvaluator()->CreateExpression(aExpression, aResolver, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::CreateNSResolver(nsIDOMNode* aNodeResolver,
|
||||
nsIDOMXPathNSResolver** aResult)
|
||||
|
||||
@@ -16,9 +16,9 @@ nsXMLBindingSet::~nsXMLBindingSet()
|
||||
{}
|
||||
|
||||
void
|
||||
nsXMLBindingSet::AddBinding(nsIAtom* aVar, nsIDOMXPathExpression* aExpr)
|
||||
nsXMLBindingSet::AddBinding(nsIAtom* aVar, nsAutoPtr<XPathExpression>&& aExpr)
|
||||
{
|
||||
nsAutoPtr<nsXMLBinding> newbinding(new nsXMLBinding(aVar, aExpr));
|
||||
nsAutoPtr<nsXMLBinding> newbinding(new nsXMLBinding(aVar, Move(aExpr)));
|
||||
|
||||
if (mFirst) {
|
||||
nsXMLBinding* binding = mFirst;
|
||||
@@ -74,18 +74,16 @@ nsXMLBindingValues::GetAssignmentFor(nsXULTemplateResultXML* aResult,
|
||||
return value;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMNode> contextNode = do_QueryInterface(aResult->Node());
|
||||
nsINode* contextNode = aResult->Node();
|
||||
if (!contextNode) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mValues.EnsureLengthAtLeast(aIndex + 1);
|
||||
|
||||
nsCOMPtr<nsISupports> resultsupports;
|
||||
aBinding->mExpr->Evaluate(contextNode, aType,
|
||||
nullptr, getter_AddRefs(resultsupports));
|
||||
|
||||
mValues.ReplaceElementAt(aIndex, XPathResult::FromSupports(resultsupports));
|
||||
ErrorResult ignored;
|
||||
mValues[aIndex] = aBinding->mExpr->Evaluate(*contextNode, aType, nullptr,
|
||||
ignored);
|
||||
|
||||
return mValues[aIndex];
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/XPathExpression.h"
|
||||
|
||||
class nsINode;
|
||||
class nsXULTemplateResultXML;
|
||||
@@ -28,11 +29,11 @@ class XPathResult;
|
||||
*/
|
||||
struct nsXMLBinding {
|
||||
nsCOMPtr<nsIAtom> mVar;
|
||||
nsCOMPtr<nsIDOMXPathExpression> mExpr;
|
||||
nsAutoPtr<mozilla::dom::XPathExpression> mExpr;
|
||||
|
||||
nsAutoPtr<nsXMLBinding> mNext;
|
||||
|
||||
nsXMLBinding(nsIAtom* aVar, nsIDOMXPathExpression* aExpr)
|
||||
nsXMLBinding(nsIAtom* aVar, nsAutoPtr<mozilla::dom::XPathExpression>&& aExpr)
|
||||
: mVar(aVar), mExpr(aExpr), mNext(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsXMLBinding);
|
||||
@@ -62,7 +63,7 @@ public:
|
||||
* Add a binding to the set
|
||||
*/
|
||||
void
|
||||
AddBinding(nsIAtom* aVar, nsIDOMXPathExpression* aExpr);
|
||||
AddBinding(nsIAtom* aVar, nsAutoPtr<mozilla::dom::XPathExpression>&& aExpr);
|
||||
|
||||
/**
|
||||
* The nsXMLBindingValues class stores an array of values, one for each
|
||||
|
||||
@@ -207,9 +207,9 @@ nsXULTemplateQueryProcessorXML::InitializeForBuilding(nsISupports* aDatasource,
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
// the datasource is either a document or a DOM element
|
||||
nsCOMPtr<nsIDOMDocument> doc = do_QueryInterface(aDatasource);
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDatasource);
|
||||
if (doc)
|
||||
doc->GetDocumentElement(getter_AddRefs(mRoot));
|
||||
mRoot = doc->GetDocumentElement();
|
||||
else
|
||||
mRoot = do_QueryInterface(aDatasource);
|
||||
NS_ENSURE_STATE(mRoot);
|
||||
@@ -236,8 +236,6 @@ nsXULTemplateQueryProcessorXML::CompileQuery(nsIXULTemplateBuilder* aBuilder,
|
||||
nsIAtom* aMemberVariable,
|
||||
nsISupports** _retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
*_retval = nullptr;
|
||||
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aQueryNode);
|
||||
@@ -250,15 +248,16 @@ nsXULTemplateQueryProcessorXML::CompileQuery(nsIXULTemplateBuilder* aBuilder,
|
||||
if (expr.IsEmpty())
|
||||
expr.Assign('*');
|
||||
|
||||
nsCOMPtr<nsIDOMXPathExpression> compiledexpr;
|
||||
rv = CreateExpression(expr, content, getter_AddRefs(compiledexpr));
|
||||
if (NS_FAILED(rv)) {
|
||||
ErrorResult rv;
|
||||
nsAutoPtr<XPathExpression> compiledexpr;
|
||||
compiledexpr = CreateExpression(expr, content, rv);
|
||||
if (rv.Failed()) {
|
||||
nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BAD_XPATH);
|
||||
return rv;
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
nsRefPtr<nsXMLQuery> query =
|
||||
new nsXMLQuery(this, aMemberVariable, compiledexpr);
|
||||
new nsXMLQuery(this, aMemberVariable, Move(compiledexpr));
|
||||
|
||||
for (nsIContent* condition = content->GetFirstChild();
|
||||
condition;
|
||||
@@ -274,16 +273,15 @@ nsXULTemplateQueryProcessorXML::CompileQuery(nsIXULTemplateBuilder* aBuilder,
|
||||
|
||||
// ignore assignments without a variable or an expression
|
||||
if (!var.IsEmpty() && !expr.IsEmpty()) {
|
||||
rv = CreateExpression(expr, condition,
|
||||
getter_AddRefs(compiledexpr));
|
||||
if (NS_FAILED(rv)) {
|
||||
compiledexpr = CreateExpression(expr, condition, rv);
|
||||
if (rv.Failed()) {
|
||||
nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BAD_ASSIGN_XPATH);
|
||||
return rv;
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAtom> varatom = do_GetAtom(var);
|
||||
|
||||
query->AddBinding(varatom, compiledexpr);
|
||||
query->AddBinding(varatom, Move(compiledexpr));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,7 +308,7 @@ nsXULTemplateQueryProcessorXML::GenerateResults(nsISupports* aDatasource,
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsCOMPtr<nsISupports> supports;
|
||||
nsCOMPtr<nsIDOMNode> context;
|
||||
nsCOMPtr<nsINode> context;
|
||||
if (aRef)
|
||||
aRef->GetBindingObjectFor(xmlquery->GetMemberVariable(),
|
||||
getter_AddRefs(supports));
|
||||
@@ -318,19 +316,20 @@ nsXULTemplateQueryProcessorXML::GenerateResults(nsISupports* aDatasource,
|
||||
if (!context)
|
||||
context = mRoot;
|
||||
|
||||
nsIDOMXPathExpression* expr = xmlquery->GetResultsExpression();
|
||||
XPathExpression* expr = xmlquery->GetResultsExpression();
|
||||
if (!expr)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsISupports> exprsupportsresults;
|
||||
nsresult rv = expr->Evaluate(context,
|
||||
XPathResult::ORDERED_NODE_SNAPSHOT_TYPE,
|
||||
nullptr, getter_AddRefs(exprsupportsresults));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ErrorResult rv;
|
||||
nsRefPtr<XPathResult> exprresults =
|
||||
expr->Evaluate(*context, XPathResult::ORDERED_NODE_SNAPSHOT_TYPE,
|
||||
nullptr, rv);
|
||||
if (rv.Failed()) {
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
XPathResult* exprresults = XPathResult::FromSupports(exprsupportsresults);
|
||||
nsXULTemplateResultSetXML* results =
|
||||
new nsXULTemplateResultSetXML(xmlquery, exprresults,
|
||||
new nsXULTemplateResultSetXML(xmlquery, exprresults.forget(),
|
||||
xmlquery->GetBindingSet());
|
||||
|
||||
*aResults = results;
|
||||
@@ -355,16 +354,17 @@ nsXULTemplateQueryProcessorXML::AddBinding(nsIDOMNode* aRuleNode,
|
||||
}
|
||||
|
||||
nsCOMPtr<nsINode> ruleNode = do_QueryInterface(aRuleNode);
|
||||
nsCOMPtr<nsIDOMXPathExpression> compiledexpr;
|
||||
nsresult rv =
|
||||
CreateExpression(aExpr, ruleNode, getter_AddRefs(compiledexpr));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
||||
ErrorResult rv;
|
||||
nsAutoPtr<XPathExpression> compiledexpr;
|
||||
compiledexpr = CreateExpression(aExpr, ruleNode, rv);
|
||||
if (rv.Failed()) {
|
||||
nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BAD_BINDING_XPATH);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// aRef isn't currently used for XML query processors
|
||||
bindings->AddBinding(aVar, compiledexpr);
|
||||
bindings->AddBinding(aVar, Move(compiledexpr));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -387,10 +387,7 @@ nsXULTemplateQueryProcessorXML::TranslateRef(nsISupports* aDatasource,
|
||||
if (!rootElement)
|
||||
return NS_OK;
|
||||
|
||||
nsXULTemplateResultXML* result =
|
||||
new nsXULTemplateResultXML(nullptr, rootElement, nullptr);
|
||||
|
||||
*aRef = result;
|
||||
*aRef = new nsXULTemplateResultXML(nullptr, rootElement, nullptr);
|
||||
NS_ADDREF(*aRef);
|
||||
|
||||
return NS_OK;
|
||||
@@ -426,19 +423,18 @@ nsXULTemplateQueryProcessorXML::GetOptionalBindingsForRule(nsIDOMNode* aRuleNode
|
||||
return mRuleToBindingsMap.GetWeak(aRuleNode);
|
||||
}
|
||||
|
||||
nsresult
|
||||
XPathExpression*
|
||||
nsXULTemplateQueryProcessorXML::CreateExpression(const nsAString& aExpr,
|
||||
nsINode* aNode,
|
||||
nsIDOMXPathExpression** aCompiledExpr)
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
ErrorResult rv;
|
||||
nsCOMPtr<nsIDOMXPathNSResolver> nsResolver =
|
||||
aNode->OwnerDoc()->CreateNSResolver(aNode, rv);
|
||||
if (rv.Failed()) {
|
||||
return rv.ErrorCode();
|
||||
aNode->OwnerDoc()->CreateNSResolver(aNode, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return mEvaluator->CreateExpression(aExpr, nsResolver, aCompiledExpr);
|
||||
return mEvaluator->CreateExpression(aExpr, nsResolver, aRv);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
#include "nsString.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIDOMXPathExpression.h"
|
||||
#include "nsIDOMXPathEvaluator.h"
|
||||
#include "nsXMLBinding.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIXMLHttpRequest.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/XPathEvaluator.h"
|
||||
#include "mozilla/dom/XPathResult.h"
|
||||
|
||||
class nsXULTemplateQueryProcessorXML;
|
||||
@@ -43,25 +43,26 @@ class nsXMLQuery MOZ_FINAL : public nsISupports
|
||||
nsIAtom* GetMemberVariable() { return mMemberVariable; }
|
||||
|
||||
// return a weak reference to the expression used to generate results
|
||||
nsIDOMXPathExpression* GetResultsExpression() { return mResultsExpr; }
|
||||
mozilla::dom::XPathExpression* GetResultsExpression()
|
||||
{ return mResultsExpr; }
|
||||
|
||||
// return a weak reference to the additional required bindings
|
||||
nsXMLBindingSet* GetBindingSet() { return mRequiredBindings; }
|
||||
|
||||
// add a required binding for the query
|
||||
void
|
||||
AddBinding(nsIAtom* aVar, nsIDOMXPathExpression* aExpr)
|
||||
AddBinding(nsIAtom* aVar, nsAutoPtr<mozilla::dom::XPathExpression>&& aExpr)
|
||||
{
|
||||
if (!mRequiredBindings) {
|
||||
mRequiredBindings = new nsXMLBindingSet();
|
||||
}
|
||||
|
||||
mRequiredBindings->AddBinding(aVar, aExpr);
|
||||
mRequiredBindings->AddBinding(aVar, mozilla::Move(aExpr));
|
||||
}
|
||||
|
||||
nsXMLQuery(nsXULTemplateQueryProcessorXML* aProcessor,
|
||||
nsIAtom* aMemberVariable,
|
||||
nsIDOMXPathExpression* aResultsExpr)
|
||||
nsIAtom* aMemberVariable,
|
||||
nsAutoPtr<mozilla::dom::XPathExpression>&& aResultsExpr)
|
||||
: mProcessor(aProcessor),
|
||||
mMemberVariable(aMemberVariable),
|
||||
mResultsExpr(aResultsExpr)
|
||||
@@ -74,7 +75,7 @@ class nsXMLQuery MOZ_FINAL : public nsISupports
|
||||
|
||||
nsCOMPtr<nsIAtom> mMemberVariable;
|
||||
|
||||
nsCOMPtr<nsIDOMXPathExpression> mResultsExpr;
|
||||
nsAutoPtr<mozilla::dom::XPathExpression> mResultsExpr;
|
||||
|
||||
nsRefPtr<nsXMLBindingSet> mRequiredBindings;
|
||||
};
|
||||
@@ -108,7 +109,7 @@ public:
|
||||
NS_DECL_NSISIMPLEENUMERATOR
|
||||
|
||||
nsXULTemplateResultSetXML(nsXMLQuery* aQuery,
|
||||
mozilla::dom::XPathResult* aResults,
|
||||
already_AddRefed<mozilla::dom::XPathResult> aResults,
|
||||
nsXMLBindingSet* aBindingSet)
|
||||
: mQuery(aQuery),
|
||||
mBindingSet(aBindingSet),
|
||||
@@ -142,10 +143,10 @@ public:
|
||||
|
||||
// create an XPath expression from aExpr, using aNode for
|
||||
// resolving namespaces
|
||||
nsresult
|
||||
mozilla::dom::XPathExpression*
|
||||
CreateExpression(const nsAString& aExpr,
|
||||
nsINode* aNode,
|
||||
nsIDOMXPathExpression** aCompiledExpr);
|
||||
mozilla::ErrorResult& aRv);
|
||||
|
||||
private:
|
||||
|
||||
@@ -155,9 +156,9 @@ private:
|
||||
|
||||
nsRefPtrHashtable<nsISupportsHashKey, nsXMLBindingSet> mRuleToBindingsMap;
|
||||
|
||||
nsCOMPtr<nsIDOMElement> mRoot;
|
||||
nsCOMPtr<mozilla::dom::Element> mRoot;
|
||||
|
||||
nsCOMPtr<nsIDOMXPathEvaluator> mEvaluator;
|
||||
nsRefPtr<mozilla::dom::XPathEvaluator> mEvaluator;
|
||||
|
||||
nsCOMPtr<nsIXULTemplateBuilder> mTemplateBuilder;
|
||||
|
||||
|
||||
@@ -111,8 +111,6 @@
|
||||
#include "nsIXULTemplateBuilder.h"
|
||||
#include "nsITreeColumns.h"
|
||||
#endif
|
||||
#include "nsIDOMXPathExpression.h"
|
||||
#include "nsIDOMNSXPathExpression.h"
|
||||
#include "nsIDOMXPathNSResolver.h"
|
||||
|
||||
// Storage includes
|
||||
@@ -344,8 +342,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||
NS_DEFINE_CLASSINFO_DATA(XSLTProcessor, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
||||
NS_DEFINE_CLASSINFO_DATA(XPathExpression, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(XPathNSResolver, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
||||
@@ -942,11 +938,6 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIXSLTProcessorPrivate)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(XPathExpression, nsIDOMXPathExpression)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMXPathExpression)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSXPathExpression)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(XPathNSResolver, nsIDOMXPathNSResolver)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMXPathNSResolver)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
@@ -46,7 +46,6 @@ DOMCI_CLASS(CSSSupportsRule)
|
||||
DOMCI_CLASS(XSLTProcessor)
|
||||
|
||||
// DOM Level 3 XPath objects
|
||||
DOMCI_CLASS(XPathExpression)
|
||||
DOMCI_CLASS(XPathNSResolver)
|
||||
|
||||
// WhatWG WebApps Objects
|
||||
|
||||
@@ -1672,6 +1672,11 @@ DOMInterfaces = {
|
||||
'resultNotAddRefed': ['singleNodeValue', 'iterateNext', 'snapshotItem']
|
||||
},
|
||||
|
||||
'XPathExpression': {
|
||||
'wrapperCache': False,
|
||||
'nativeOwnership': 'owned',
|
||||
},
|
||||
|
||||
'XULDocument': {
|
||||
'headerFile': 'XULDocument.h'
|
||||
},
|
||||
@@ -2011,6 +2016,5 @@ addExternalIface('StackFrame', nativeType='nsIStackFrame',
|
||||
addExternalIface('URI', nativeType='nsIURI', headerFile='nsIURI.h',
|
||||
notflattened=True)
|
||||
addExternalIface('UserDataHandler')
|
||||
addExternalIface('XPathExpression')
|
||||
addExternalIface('XPathNSResolver')
|
||||
addExternalIface('XULCommandDispatcher')
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMNSXPathExpression.idl',
|
||||
'nsIDOMXPathEvaluator.idl',
|
||||
'nsIDOMXPathExpression.idl',
|
||||
'nsIDOMXPathNSResolver.idl',
|
||||
'nsIDOMXPathResult.idl',
|
||||
]
|
||||
|
||||
@@ -1,34 +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"
|
||||
|
||||
interface XPathException;
|
||||
|
||||
/**
|
||||
* Interface for Mozilla specific XPathExpression functions.
|
||||
*/
|
||||
[scriptable, uuid(ce600ca8-e98a-4419-ad61-2f6d0cb0ecc8)]
|
||||
interface nsIDOMNSXPathExpression : nsISupports
|
||||
{
|
||||
/**
|
||||
* Evaluate the expression with the given context. Similar to
|
||||
* nsIDOMXPathExpression::evaluate(), except that this takes the context
|
||||
* position and size too.
|
||||
*
|
||||
* @param contextNode The context node
|
||||
* @param contextPosition The context position
|
||||
* @param contextSize The context size
|
||||
* @param type The needed result type
|
||||
* @param result The result
|
||||
*/
|
||||
nsISupports evaluateWithContext(in nsIDOMNode contextNode,
|
||||
in unsigned long contextPosition,
|
||||
in unsigned long contextSize,
|
||||
in unsigned short type,
|
||||
in nsISupports result)
|
||||
raises(XPathException,
|
||||
DOMException);
|
||||
};
|
||||
@@ -10,16 +10,11 @@
|
||||
#include "domstubs.idl"
|
||||
|
||||
interface nsIDOMXPathNSResolver;
|
||||
interface nsIDOMXPathExpression;
|
||||
interface XPathException;
|
||||
|
||||
[uuid(75506f8a-b504-11d5-a7f2-ca108ab8b6fc)]
|
||||
[uuid(89a0fe71-c1d9-46bd-b76b-47f51fd935ff)]
|
||||
interface nsIDOMXPathEvaluator : nsISupports
|
||||
{
|
||||
nsIDOMXPathExpression createExpression(in DOMString expression,
|
||||
in nsIDOMXPathNSResolver resolver)
|
||||
raises(XPathException,
|
||||
DOMException);
|
||||
nsIDOMXPathNSResolver createNSResolver(in nsIDOMNode nodeResolver);
|
||||
nsISupports evaluate(in DOMString expression,
|
||||
in nsIDOMNode contextNode,
|
||||
|
||||
@@ -1,22 +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/. */
|
||||
|
||||
/**
|
||||
* Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208
|
||||
*/
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
interface XPathException;
|
||||
|
||||
[scriptable, uuid(75506f82-b504-11d5-a7f2-ca108ab8b6fc)]
|
||||
interface nsIDOMXPathExpression : nsISupports
|
||||
{
|
||||
nsISupports evaluate(in nsIDOMNode contextNode,
|
||||
in unsigned short type,
|
||||
in nsISupports result)
|
||||
raises(XPathException,
|
||||
DOMException);
|
||||
};
|
||||
@@ -4,7 +4,6 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
interface XPathExpression;
|
||||
interface XPathNSResolver;
|
||||
|
||||
[Constructor]
|
||||
|
||||
22
dom/webidl/XPathExpression.webidl
Normal file
22
dom/webidl/XPathExpression.webidl
Normal file
@@ -0,0 +1,22 @@
|
||||
/* -*- 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/.
|
||||
*/
|
||||
|
||||
interface XPathExpression {
|
||||
// The result specifies a specific result object which may be reused and
|
||||
// returned by this method. If this is specified as null or it's not an
|
||||
// XPathResult object, a new result object will be constructed and returned.
|
||||
[Throws]
|
||||
XPathResult evaluate(Node contextNode, unsigned short type, object? result);
|
||||
|
||||
// The result specifies a specific result object which may be reused and
|
||||
// returned by this method. If this is specified as null or it's not an
|
||||
// XPathResult object, a new result object will be constructed and returned.
|
||||
[Throws, ChromeOnly]
|
||||
XPathResult evaluateWithContext(Node contextNode,
|
||||
unsigned long contextPosition,
|
||||
unsigned long contextSize,
|
||||
unsigned short type, object? result);
|
||||
};
|
||||
@@ -481,6 +481,7 @@ WEBIDL_FILES = [
|
||||
'XMLSerializer.webidl',
|
||||
'XMLStylesheetProcessingInstruction.webidl',
|
||||
'XPathEvaluator.webidl',
|
||||
'XPathExpression.webidl',
|
||||
'XPathResult.webidl',
|
||||
'XULCommandEvent.webidl',
|
||||
'XULDocument.webidl',
|
||||
|
||||
@@ -95,21 +95,37 @@ XPathEvaluator::Evaluate(const nsAString & aExpression,
|
||||
nsISupports *aInResult,
|
||||
nsISupports **aResult)
|
||||
{
|
||||
nsCOMPtr<nsIDOMXPathExpression> expression;
|
||||
nsresult rv = CreateExpression(aExpression, aResolver,
|
||||
getter_AddRefs(expression));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ErrorResult rv;
|
||||
nsAutoPtr<XPathExpression> expression(CreateExpression(aExpression,
|
||||
aResolver, rv));
|
||||
if (rv.Failed()) {
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
return expression->Evaluate(aContextNode, aType, aInResult, aResult);
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aContextNode);
|
||||
if (!node) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIXPathResult> inResult = do_QueryInterface(aInResult);
|
||||
nsRefPtr<XPathResult> result =
|
||||
expression->Evaluate(*node, aType,
|
||||
static_cast<XPathResult*>(inResult.get()), rv);
|
||||
if (rv.Failed()) {
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
*aResult = ToSupports(result.forget().take());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPathExpression*
|
||||
XPathEvaluator::CreateExpression(const nsAString & aExpression,
|
||||
nsIDOMXPathNSResolver *aResolver,
|
||||
nsIDOMXPathExpression **aResult)
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsresult rv;
|
||||
if (!mRecycler) {
|
||||
mRecycler = new txResultRecycler;
|
||||
}
|
||||
@@ -118,25 +134,17 @@ XPathEvaluator::CreateExpression(const nsAString & aExpression,
|
||||
XPathEvaluatorParseContext pContext(aResolver, !(doc && doc->IsHTML()));
|
||||
|
||||
nsAutoPtr<Expr> expression;
|
||||
rv = txExprParser::createExpr(PromiseFlatString(aExpression), &pContext,
|
||||
getter_Transfers(expression));
|
||||
if (NS_FAILED(rv)) {
|
||||
if (rv == NS_ERROR_DOM_NAMESPACE_ERR) {
|
||||
return NS_ERROR_DOM_NAMESPACE_ERR;
|
||||
aRv = txExprParser::createExpr(PromiseFlatString(aExpression), &pContext,
|
||||
getter_Transfers(expression));
|
||||
if (aRv.Failed()) {
|
||||
if (aRv.ErrorCode() != NS_ERROR_DOM_NAMESPACE_ERR) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_EXPRESSION_ERR);
|
||||
}
|
||||
|
||||
return NS_ERROR_DOM_INVALID_EXPRESSION_ERR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> document = do_QueryReferent(mDocument);
|
||||
|
||||
*aResult = new XPathExpression(Move(expression), mRecycler, document);
|
||||
if (!*aResult) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
return new XPathExpression(Move(expression), mRecycler, doc);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
@@ -154,16 +162,6 @@ XPathEvaluator::Constructor(const GlobalObject& aGlobal,
|
||||
return newObj.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMXPathExpression>
|
||||
XPathEvaluator::CreateExpression(const nsAString& aExpression,
|
||||
nsIDOMXPathNSResolver* aResolver,
|
||||
ErrorResult& rv)
|
||||
{
|
||||
nsCOMPtr<nsIDOMXPathExpression> expr;
|
||||
rv = CreateExpression(aExpression, aResolver, getter_AddRefs(expr));
|
||||
return expr.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMXPathNSResolver>
|
||||
XPathEvaluator::CreateNSResolver(nsINode* aNodeResolver,
|
||||
ErrorResult& rv)
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class GlobalObject;
|
||||
class XPathExpression;
|
||||
class XPathResult;
|
||||
|
||||
/**
|
||||
@@ -47,7 +48,7 @@ public:
|
||||
}
|
||||
static already_AddRefed<XPathEvaluator>
|
||||
Constructor(const GlobalObject& aGlobal, ErrorResult& rv);
|
||||
already_AddRefed<nsIDOMXPathExpression>
|
||||
XPathExpression*
|
||||
CreateExpression(const nsAString& aExpression,
|
||||
nsIDOMXPathNSResolver* aResolver,
|
||||
ErrorResult& rv);
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
#include "XPathResult.h"
|
||||
#include "txURIUtils.h"
|
||||
#include "txXPathTreeWalker.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/XPathResultBinding.h"
|
||||
|
||||
using mozilla::Move;
|
||||
|
||||
DOMCI_DATA(XPathExpression, mozilla::dom::XPathExpression)
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -52,19 +52,9 @@ private:
|
||||
nsRefPtr<txResultRecycler> mRecycler;
|
||||
};
|
||||
|
||||
NS_IMPL_ADDREF(XPathExpression)
|
||||
NS_IMPL_RELEASE(XPathExpression)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(XPathExpression)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMXPathExpression)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMNSXPathExpression)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMXPathExpression)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(XPathExpression)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
XPathExpression::XPathExpression(nsAutoPtr<Expr>&& aExpression,
|
||||
txResultRecycler* aRecycler,
|
||||
nsIDOMDocument *aDocument)
|
||||
nsIDocument *aDocument)
|
||||
: mExpression(Move(aExpression)),
|
||||
mRecycler(aRecycler),
|
||||
mDocument(do_GetWeakReference(aDocument)),
|
||||
@@ -72,56 +62,74 @@ XPathExpression::XPathExpression(nsAutoPtr<Expr>&& aExpression,
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPathExpression::Evaluate(nsIDOMNode *aContextNode,
|
||||
uint16_t aType,
|
||||
nsISupports *aInResult,
|
||||
nsISupports **aResult)
|
||||
XPathExpression::~XPathExpression()
|
||||
{
|
||||
return EvaluateWithContext(aContextNode, 1, 1, aType, aInResult, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPathExpression::EvaluateWithContext(nsIDOMNode *aContextNode,
|
||||
already_AddRefed<XPathResult>
|
||||
XPathExpression::EvaluateWithContext(JSContext* aCx,
|
||||
nsINode& aContextNode,
|
||||
uint32_t aContextPosition,
|
||||
uint32_t aContextSize,
|
||||
uint16_t aType,
|
||||
nsISupports *aInResult,
|
||||
nsISupports **aResult)
|
||||
JS::Handle<JSObject*> aInResult,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<nsINode> context = do_QueryInterface(aContextNode);
|
||||
NS_ENSURE_ARG(context);
|
||||
|
||||
if (aContextPosition > aContextSize)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (!nsContentUtils::CanCallerAccess(aContextNode))
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
|
||||
if (mCheckDocument) {
|
||||
nsCOMPtr<nsIDOMDocument> doc = do_QueryReferent(mDocument);
|
||||
if (!doc || doc != aContextNode) {
|
||||
nsCOMPtr<nsIDOMDocument> contextDocument;
|
||||
aContextNode->GetOwnerDocument(getter_AddRefs(contextDocument));
|
||||
|
||||
if (doc != contextDocument) {
|
||||
return NS_ERROR_DOM_WRONG_DOCUMENT_ERR;
|
||||
}
|
||||
XPathResult* inResult = nullptr;
|
||||
if (aInResult) {
|
||||
nsresult rv = UNWRAP_OBJECT(XPathResult, aInResult, inResult);
|
||||
if (NS_FAILED(rv) && rv != NS_ERROR_XPC_BAD_CONVERT_JS) {
|
||||
aRv.Throw(rv);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t nodeType = context->NodeType();
|
||||
return EvaluateWithContext(aContextNode, aContextPosition, aContextSize,
|
||||
aType, inResult, aRv);
|
||||
}
|
||||
|
||||
already_AddRefed<XPathResult>
|
||||
XPathExpression::EvaluateWithContext(nsINode& aContextNode,
|
||||
uint32_t aContextPosition,
|
||||
uint32_t aContextSize,
|
||||
uint16_t aType,
|
||||
XPathResult* aInResult,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (aContextPosition > aContextSize) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::CanCallerAccess(&aContextNode)) {
|
||||
aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mCheckDocument) {
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument);
|
||||
if (doc != aContextNode.OwnerDoc()) {
|
||||
aRv.Throw(NS_ERROR_DOM_WRONG_DOCUMENT_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t nodeType = aContextNode.NodeType();
|
||||
|
||||
if (nodeType == nsIDOMNode::TEXT_NODE ||
|
||||
nodeType == nsIDOMNode::CDATA_SECTION_NODE) {
|
||||
nsCOMPtr<nsIDOMCharacterData> textNode = do_QueryInterface(aContextNode);
|
||||
NS_ENSURE_TRUE(textNode, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIDOMCharacterData> textNode =
|
||||
do_QueryInterface(&aContextNode);
|
||||
if (!textNode) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (textNode) {
|
||||
uint32_t textLength;
|
||||
textNode->GetLength(&textLength);
|
||||
if (textLength == 0)
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
uint32_t textLength;
|
||||
textNode->GetLength(&textLength);
|
||||
if (textLength == 0) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// XXX Need to get logical XPath text node for CDATASection
|
||||
@@ -132,22 +140,18 @@ XPathExpression::EvaluateWithContext(nsIDOMNode *aContextNode,
|
||||
nodeType != nsIDOMNode::ATTRIBUTE_NODE &&
|
||||
nodeType != nsIDOMNode::COMMENT_NODE &&
|
||||
nodeType != nsIDOMNode::PROCESSING_INSTRUCTION_NODE) {
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
}
|
||||
|
||||
NS_ENSURE_ARG(aResult);
|
||||
*aResult = nullptr;
|
||||
|
||||
nsAutoPtr<txXPathNode> contextNode(txXPathNativeNode::createXPathNode(aContextNode));
|
||||
if (!contextNode) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsAutoPtr<txXPathNode> contextNode(txXPathNativeNode::createXPathNode(&aContextNode));
|
||||
EvalContextImpl eContext(*contextNode, aContextPosition, aContextSize,
|
||||
mRecycler);
|
||||
nsRefPtr<txAExprResult> exprResult;
|
||||
nsresult rv = mExpression->evaluate(&eContext, getter_AddRefs(exprResult));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aRv = mExpression->evaluate(&eContext, getter_AddRefs(exprResult));
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint16_t resultType = aType;
|
||||
if (aType == XPathResult::ANY_TYPE) {
|
||||
@@ -166,21 +170,19 @@ XPathExpression::EvaluateWithContext(nsIDOMNode *aContextNode,
|
||||
resultType = XPathResult::UNORDERED_NODE_ITERATOR_TYPE;
|
||||
break;
|
||||
case txAExprResult::RESULT_TREE_FRAGMENT:
|
||||
NS_ERROR("Can't return a tree fragment!");
|
||||
return NS_ERROR_FAILURE;
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// We need a result object and it must be our implementation.
|
||||
nsCOMPtr<nsIXPathResult> xpathResult = do_QueryInterface(aInResult);
|
||||
nsRefPtr<XPathResult> xpathResult = aInResult;
|
||||
if (!xpathResult) {
|
||||
// Either no aInResult or not one of ours.
|
||||
xpathResult = new XPathResult(context);
|
||||
xpathResult = new XPathResult(&aContextNode);
|
||||
}
|
||||
rv = xpathResult->SetExprResult(exprResult, resultType, context);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return CallQueryInterface(xpathResult, aResult);
|
||||
aRv = xpathResult->SetExprResult(exprResult, resultType, &aContextNode);
|
||||
|
||||
return xpathResult.forget();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -6,42 +6,63 @@
|
||||
#ifndef mozilla_dom_XPathExpression_h
|
||||
#define mozilla_dom_XPathExpression_h
|
||||
|
||||
#include "nsIDOMXPathExpression.h"
|
||||
#include "nsIDOMNSXPathExpression.h"
|
||||
#include "txResultRecycler.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIWeakReferenceUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/NonRefcountedDOMObject.h"
|
||||
#include "mozilla/dom/XPathExpressionBinding.h"
|
||||
|
||||
class Expr;
|
||||
class nsIDocument;
|
||||
class nsINode;
|
||||
class txResultRecycler;
|
||||
class txXPathNode;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class XPathResult;
|
||||
|
||||
/**
|
||||
* A class for evaluating an XPath expression string
|
||||
*/
|
||||
class XPathExpression MOZ_FINAL : public nsIDOMXPathExpression,
|
||||
public nsIDOMNSXPathExpression
|
||||
class XPathExpression MOZ_FINAL : public NonRefcountedDOMObject
|
||||
{
|
||||
public:
|
||||
XPathExpression(nsAutoPtr<Expr>&& aExpression, txResultRecycler* aRecycler,
|
||||
nsIDOMDocument *aDocument);
|
||||
nsIDocument *aDocument);
|
||||
~XPathExpression();
|
||||
|
||||
// nsISupports interface
|
||||
NS_DECL_ISUPPORTS
|
||||
JSObject* WrapObject(JSContext* aCx, bool* aTookOwnership)
|
||||
{
|
||||
return XPathExpressionBinding::Wrap(aCx, this, aTookOwnership);
|
||||
}
|
||||
|
||||
// nsIDOMXPathExpression interface
|
||||
NS_DECL_NSIDOMXPATHEXPRESSION
|
||||
|
||||
// nsIDOMNSXPathExpression interface
|
||||
NS_DECL_NSIDOMNSXPATHEXPRESSION
|
||||
already_AddRefed<XPathResult>
|
||||
Evaluate(JSContext* aCx, nsINode& aContextNode, uint16_t aType,
|
||||
JS::Handle<JSObject*> aInResult, ErrorResult& aRv)
|
||||
{
|
||||
return EvaluateWithContext(aCx, aContextNode, 1, 1, aType, aInResult,
|
||||
aRv);
|
||||
}
|
||||
already_AddRefed<XPathResult>
|
||||
EvaluateWithContext(JSContext* aCx, nsINode& aContextNode,
|
||||
uint32_t aContextPosition, uint32_t aContextSize,
|
||||
uint16_t aType, JS::Handle<JSObject*> aInResult,
|
||||
ErrorResult& aRv);
|
||||
already_AddRefed<XPathResult>
|
||||
Evaluate(nsINode& aContextNode, uint16_t aType, XPathResult* aInResult,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
return EvaluateWithContext(aContextNode, 1, 1, aType, aInResult, aRv);
|
||||
}
|
||||
already_AddRefed<XPathResult>
|
||||
EvaluateWithContext(nsINode& aContextNode, uint32_t aContextPosition,
|
||||
uint32_t aContextSize, uint16_t aType,
|
||||
XPathResult* aInResult, ErrorResult& aRv);
|
||||
|
||||
private:
|
||||
~nsXPathExpression() {}
|
||||
|
||||
nsAutoPtr<Expr> mExpression;
|
||||
nsRefPtr<txResultRecycler> mRecycler;
|
||||
nsWeakPtr mDocument;
|
||||
|
||||
@@ -41,9 +41,7 @@ members = [
|
||||
'nsIDOMStorage.clear',
|
||||
|
||||
# dom/interfaces/xpath
|
||||
'nsIDOMXPathExpression.evaluate',
|
||||
'nsIDOMXPathNSResolver.lookupNamespaceURI',
|
||||
'nsIDOMNSXPathExpression.evaluateWithContext',
|
||||
|
||||
# layout/xul/base/public
|
||||
'nsIBoxObject.x',
|
||||
|
||||
Reference in New Issue
Block a user