From 7262b1ae7019735ec78049d13ac7bff0a7f43935 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 24 Apr 2014 12:07:44 -0400 Subject: [PATCH] Bug 998738 - Kill nsIDOMXPathNamespace (and window.XPathNamespace); r=smaug --- dom/base/nsDOMClassInfo.cpp | 9 --------- dom/base/nsDOMClassInfoClasses.h | 1 - dom/interfaces/xpath/moz.build | 1 - dom/interfaces/xpath/nsIDOMXPathNamespace.idl | 19 ------------------- .../tests/marionette/ril_jshint/jshint.js | 1 - .../mochitest/general/test_interfaces.html | 2 -- dom/xslt/xpath/nsXPathExpression.cpp | 4 +--- .../tests/mochitest/test_bug790732.html | 1 - 8 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 dom/interfaces/xpath/nsIDOMXPathNamespace.idl diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 69721ea93ea1..d9d2750f0a3e 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -75,7 +75,6 @@ // DOM core includes #include "nsError.h" #include "nsIDOMUserDataHandler.h" -#include "nsIDOMXPathNamespace.h" #include "nsIDOMXULButtonElement.h" #include "nsIDOMXULCheckboxElement.h" #include "nsIDOMXULPopupElement.h" @@ -223,7 +222,6 @@ DOMCI_DATA_NO_CLASS(DOMPrototype) DOMCI_DATA_NO_CLASS(DOMConstructor) DOMCI_DATA_NO_CLASS(UserDataHandler) -DOMCI_DATA_NO_CLASS(XPathNamespace) DOMCI_DATA_NO_CLASS(XULControlElement) DOMCI_DATA_NO_CLASS(XULLabeledControlElement) DOMCI_DATA_NO_CLASS(XULButtonElement) @@ -448,8 +446,6 @@ static nsDOMClassInfoData sClassInfoData[] = { NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(UserDataHandler, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) - NS_DEFINE_CLASSINFO_DATA(XPathNamespace, nsDOMGenericSH, - DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(XULControlElement, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(XULLabeledControlElement, nsDOMGenericSH, @@ -1121,10 +1117,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMUserDataHandler) DOM_CLASSINFO_MAP_END - DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XPathNamespace, nsIDOMXPathNamespace) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMXPathNamespace) - DOM_CLASSINFO_MAP_END - DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULControlElement, nsIDOMXULControlElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULControlElement) DOM_CLASSINFO_MAP_END @@ -3166,7 +3158,6 @@ const InterfaceShimEntry kInterfaceShimMap[] = { "nsIDOMRange", "Range" }, { "nsIDOMSVGLength", "SVGLength" }, { "nsIDOMNodeFilter", "NodeFilter" }, - { "nsIDOMXPathNamespace", "XPathNamespace" }, { "nsIDOMXPathResult", "XPathResult" } }; static nsresult diff --git a/dom/base/nsDOMClassInfoClasses.h b/dom/base/nsDOMClassInfoClasses.h index d7515033416e..40078b554902 100644 --- a/dom/base/nsDOMClassInfoClasses.h +++ b/dom/base/nsDOMClassInfoClasses.h @@ -93,7 +93,6 @@ DOMCI_CLASS(CSSPageRule) DOMCI_CLASS(CSSFontFeatureValuesRule) DOMCI_CLASS(UserDataHandler) -DOMCI_CLASS(XPathNamespace) DOMCI_CLASS(XULControlElement) DOMCI_CLASS(XULLabeledControlElement) DOMCI_CLASS(XULButtonElement) diff --git a/dom/interfaces/xpath/moz.build b/dom/interfaces/xpath/moz.build index d31f0de9cd8c..e3b0d95d9f60 100644 --- a/dom/interfaces/xpath/moz.build +++ b/dom/interfaces/xpath/moz.build @@ -8,7 +8,6 @@ XPIDL_SOURCES += [ 'nsIDOMNSXPathExpression.idl', 'nsIDOMXPathEvaluator.idl', 'nsIDOMXPathExpression.idl', - 'nsIDOMXPathNamespace.idl', 'nsIDOMXPathNSResolver.idl', 'nsIDOMXPathResult.idl', ] diff --git a/dom/interfaces/xpath/nsIDOMXPathNamespace.idl b/dom/interfaces/xpath/nsIDOMXPathNamespace.idl deleted file mode 100644 index b0fc3164c9ab..000000000000 --- a/dom/interfaces/xpath/nsIDOMXPathNamespace.idl +++ /dev/null @@ -1,19 +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 "nsIDOMNode.idl" - -[scriptable, uuid(558c2ab9-513e-43c2-afea-4930024b15b3)] -interface nsIDOMXPathNamespace : nsIDOMNode -{ - // XPathNodeType - const unsigned short XPATH_NAMESPACE_NODE = 13; - - readonly attribute nsIDOMElement ownerElement; -}; diff --git a/dom/system/gonk/tests/marionette/ril_jshint/jshint.js b/dom/system/gonk/tests/marionette/ril_jshint/jshint.js index 1acdb6c80cca..ec5263a5b992 100644 --- a/dom/system/gonk/tests/marionette/ril_jshint/jshint.js +++ b/dom/system/gonk/tests/marionette/ril_jshint/jshint.js @@ -584,7 +584,6 @@ exports.browser = { XPathEvaluator : false, XPathException : false, XPathExpression : false, - XPathNamespace : false, XPathNSResolver : false, XPathResult : false }; diff --git a/dom/tests/mochitest/general/test_interfaces.html b/dom/tests/mochitest/general/test_interfaces.html index 2a893ce2f95a..f835788c9c44 100644 --- a/dom/tests/mochitest/general/test_interfaces.html +++ b/dom/tests/mochitest/general/test_interfaces.html @@ -1189,8 +1189,6 @@ var interfaceNamesInGlobalScope = "XPathEvaluator", // IMPORTANT: Do not change this list without review from a DOM peer! "XPathExpression", -// IMPORTANT: Do not change this list without review from a DOM peer! - "XPathNamespace", // IMPORTANT: Do not change this list without review from a DOM peer! "XPathNSResolver", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/xslt/xpath/nsXPathExpression.cpp b/dom/xslt/xpath/nsXPathExpression.cpp index 62fe4000947a..fa040902c344 100644 --- a/dom/xslt/xpath/nsXPathExpression.cpp +++ b/dom/xslt/xpath/nsXPathExpression.cpp @@ -10,7 +10,6 @@ #include "nsIDOMCharacterData.h" #include "nsDOMClassInfoID.h" #include "nsIDOMDocument.h" -#include "nsIDOMXPathNamespace.h" #include "nsXPathResult.h" #include "txURIUtils.h" #include "txXPathTreeWalker.h" @@ -94,8 +93,7 @@ nsXPathExpression::EvaluateWithContext(nsIDOMNode *aContextNode, nodeType != nsIDOMNode::ELEMENT_NODE && nodeType != nsIDOMNode::ATTRIBUTE_NODE && nodeType != nsIDOMNode::COMMENT_NODE && - nodeType != nsIDOMNode::PROCESSING_INSTRUCTION_NODE && - nodeType != nsIDOMXPathNamespace::XPATH_NAMESPACE_NODE) { + nodeType != nsIDOMNode::PROCESSING_INSTRUCTION_NODE) { return NS_ERROR_DOM_NOT_SUPPORTED_ERR; } diff --git a/js/xpconnect/tests/mochitest/test_bug790732.html b/js/xpconnect/tests/mochitest/test_bug790732.html index 63667209d84d..9f3a7d1a3c21 100644 --- a/js/xpconnect/tests/mochitest/test_bug790732.html +++ b/js/xpconnect/tests/mochitest/test_bug790732.html @@ -41,7 +41,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=790732 is(Ci.nsIDOMRange, Range); is(Ci.nsIDOMSVGLength, SVGLength); is(Ci.nsIDOMNodeFilter, NodeFilter); - is(Ci.nsIDOMXPathNamespace, XPathNamespace); is(Ci.nsIDOMXPathResult, XPathResult); // Test for Bug 895231