Bug 1318096 part 1. Remove unused XPCOM querySelector(All) bits. r=froydnj
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 17 Nov 2016 13:49:26 -0500
changeset 323188 d73246f35fb2fb567d1091bb2db313b044272dad
parent 323187 d26f1371c83c1b43385ebaae59ef16a4aafb6420
child 323189 39c74224241118918180b890fa47af54588a240e
push id30971
push usercbook@mozilla.com
push dateFri, 18 Nov 2016 15:51:34 +0000
treeherdermozilla-central@a103e1713a2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1318096
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1318096 part 1. Remove unused XPCOM querySelector(All) bits. r=froydnj
dom/base/DocumentFragment.cpp
dom/base/Element.h
dom/base/nsDocument.cpp
dom/base/nsINode.cpp
dom/base/nsINode.h
dom/interfaces/core/nsIDOMDocument.idl
dom/interfaces/core/nsIDOMDocumentFragment.idl
dom/interfaces/core/nsIDOMElement.idl
--- a/dom/base/DocumentFragment.cpp
+++ b/dom/base/DocumentFragment.cpp
@@ -31,30 +31,16 @@ DocumentFragment::WrapNode(JSContext *aC
 }
 
 bool
 DocumentFragment::IsNodeOfType(uint32_t aFlags) const
 {
   return !(aFlags & ~(eCONTENT | eDOCUMENT_FRAGMENT));
 }
 
-NS_IMETHODIMP
-DocumentFragment::QuerySelector(const nsAString& aSelector,
-                                nsIDOMElement **aReturn)
-{
-  return nsINode::QuerySelector(aSelector, aReturn);
-}
-
-NS_IMETHODIMP
-DocumentFragment::QuerySelectorAll(const nsAString& aSelector,
-                                   nsIDOMNodeList **aReturn)
-{
-  return nsINode::QuerySelectorAll(aSelector, aReturn);
-}
-
 #ifdef DEBUG
 void
 DocumentFragment::List(FILE* out, int32_t aIndent) const
 {
   int32_t indent;
   for (indent = aIndent; --indent >= 0; ) {
     fputs("  ", out);
   }
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -1893,23 +1893,10 @@ NS_IMETHOD MozRequestFullScreen(void) fi
   mozilla::ErrorResult rv;                                                    \
   Element::RequestFullscreen(rv);                                    \
   return rv.StealNSResult();                                                  \
 }                                                                             \
 NS_IMETHOD MozRequestPointerLock(void) final override                         \
 {                                                                             \
   Element::RequestPointerLock();                                              \
   return NS_OK;                                                               \
-}                                                                             \
-using nsINode::QuerySelector;                                                 \
-NS_IMETHOD QuerySelector(const nsAString& aSelector,                          \
-                         nsIDOMElement **aReturn) final override              \
-{                                                                             \
-  return nsINode::QuerySelector(aSelector, aReturn);                          \
-}                                                                             \
-using nsINode::QuerySelectorAll;                                              \
-NS_IMETHOD QuerySelectorAll(const nsAString& aSelector,                       \
-                            nsIDOMNodeList **aReturn) final override          \
-{                                                                             \
-  return nsINode::QuerySelectorAll(aSelector, aReturn);                       \
 }
-
 #endif // mozilla_dom_Element_h__
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -12056,28 +12056,16 @@ nsDocument::DocAddSizeOfExcludingThis(ns
   aWindowSizes->mDOMOtherSize +=
     mIdentifierMap.SizeOfExcludingThis(aWindowSizes->mMallocSizeOf);
 
   // Measurement of the following members may be added later if DMD finds it
   // is worthwhile:
   // - many!
 }
 
-NS_IMETHODIMP
-nsDocument::QuerySelector(const nsAString& aSelector, nsIDOMElement **aReturn)
-{
-  return nsINode::QuerySelector(aSelector, aReturn);
-}
-
-NS_IMETHODIMP
-nsDocument::QuerySelectorAll(const nsAString& aSelector, nsIDOMNodeList **aReturn)
-{
-  return nsINode::QuerySelectorAll(aSelector, aReturn);
-}
-
 already_AddRefed<nsIDocument>
 nsIDocument::Constructor(const GlobalObject& aGlobal,
                          ErrorResult& rv)
 {
   nsCOMPtr<nsIScriptGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   if (!global) {
     rv.Throw(NS_ERROR_UNEXPECTED);
     return nullptr;
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -2947,37 +2947,16 @@ nsINode::QuerySelectorAll(const nsAStrin
   } else {
     // Either we failed (and aResult already has the exception), or this
     // is a pseudo-element-only selector that matches nothing.
   }
 
   return contentList.forget();
 }
 
-nsresult
-nsINode::QuerySelector(const nsAString& aSelector, nsIDOMElement **aReturn)
-{
-  ErrorResult rv;
-  Element* result = nsINode::QuerySelector(aSelector, rv);
-  if (rv.Failed()) {
-    return rv.StealNSResult();
-  }
-  nsCOMPtr<nsIDOMElement> elt = do_QueryInterface(result);
-  elt.forget(aReturn);
-  return NS_OK;
-}
-
-nsresult
-nsINode::QuerySelectorAll(const nsAString& aSelector, nsIDOMNodeList **aReturn)
-{
-  ErrorResult rv;
-  *aReturn = nsINode::QuerySelectorAll(aSelector, rv).take();
-  return rv.StealNSResult();
-}
-
 Element*
 nsINode::GetElementById(const nsAString& aId)
 {
   MOZ_ASSERT(IsElement() || IsNodeOfType(eDOCUMENT_FRAGMENT),
              "Bogus this object for GetElementById call");
   if (IsInUncomposedDoc()) {
     ElementHolder holder;
     FindMatchingElementsWithId<true>(aId, this, nullptr, holder);
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
@@ -1345,19 +1345,16 @@ public:
     SetTextContentInternal(aTextContent, aError);
   }
 
   mozilla::dom::Element* QuerySelector(const nsAString& aSelector,
                                        mozilla::ErrorResult& aResult);
   already_AddRefed<nsINodeList> QuerySelectorAll(const nsAString& aSelector,
                                                  mozilla::ErrorResult& aResult);
 
-  nsresult QuerySelector(const nsAString& aSelector, nsIDOMElement **aReturn);
-  nsresult QuerySelectorAll(const nsAString& aSelector, nsIDOMNodeList **aReturn);
-
 protected:
   // nsIDocument overrides this with its own (faster) version.  This
   // should really only be called for elements and document fragments.
   mozilla::dom::Element* GetElementById(const nsAString& aId);
 
 public:
   /**
    * Associate an object aData to aKey on this node. If aData is null any
--- a/dom/interfaces/core/nsIDOMDocument.idl
+++ b/dom/interfaces/core/nsIDOMDocument.idl
@@ -399,17 +399,9 @@ interface nsIDOMDocument : nsIDOMNode
   readonly attribute boolean hidden;
   readonly attribute DOMString visibilityState;
 
   /**
    * Returns "BackCompat" if we're in quirks mode or "CSS1Compat" if we're in
    * strict mode.  (XML documents are always in strict mode.)
    */
   readonly attribute DOMString compatMode;
-
-  /**
-   * Return nodes that match a given CSS selector.
-   *
-   * @see <http://dev.w3.org/2006/webapi/selectors-api/>
-   */
-  nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
-  nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors);
 };
--- a/dom/interfaces/core/nsIDOMDocumentFragment.idl
+++ b/dom/interfaces/core/nsIDOMDocumentFragment.idl
@@ -12,16 +12,9 @@
  *
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
 [builtinclass, uuid(48eb8d72-95bb-402e-a8fc-f2b187abcbdb)]
 interface nsIDOMDocumentFragment : nsIDOMNode
 {
-  /**
-   * Return nodes that match a given CSS selector.
-   *
-   * @see <http://dev.w3.org/2006/webapi/selectors-api/>
-   */
-  nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
-  nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors);
 };
--- a/dom/interfaces/core/nsIDOMElement.idl
+++ b/dom/interfaces/core/nsIDOMElement.idl
@@ -213,17 +213,9 @@ interface nsIDOMElement : nsIDOMNode
 
   /**
    * Requests that this element be made the pointer-locked element, as per the DOM
    * pointer lock api.
    *
    * @see <http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html>
    */
   void mozRequestPointerLock();
-
-  /**
-   * Return nodes that match a given CSS selector.
-   *
-   * @see <http://dev.w3.org/2006/webapi/selectors-api/>
-   */
-  nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
-  nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors);
 };