Bug 1485702 - Remove unused WalkerFront.search's selectorsOnly argument. r=gl
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 23 Aug 2018 15:36:48 +0000
changeset 488126 77c50281ad2b074a52797cba560444a5585d339c
parent 488125 0503d6eb70a76db7a941202ae05e1bfc448714b2
child 488127 7b78aeca32ed9b21e11e7ff76be8743aced52408
child 488243 4a4b4a9b58d3d05942fcf843e5d4113f609261d6
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1485702
milestone63.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 1485702 - Remove unused WalkerFront.search's selectorsOnly argument. r=gl Differential Revision: https://phabricator.services.mozilla.com/D4089
devtools/shared/fronts/inspector.js
--- a/devtools/shared/fronts/inspector.js
+++ b/devtools/shared/fronts/inspector.js
@@ -198,38 +198,24 @@ const WalkerFront = FrontClassWithSpec(w
    * For modern servers, results will be searched with using the WalkerActor
    * `search` function (includes tag names, attributes, and text contents).
    * Only 1 result is sent back, and calling the method again with the same
    * query will send the next result. When there are no more results to be sent
    * back, null is sent.
    * @param {String} query
    * @param {Object} options
    *    - "reverse": search backwards
-   *    - "selectorOnly": treat input as a selector string (don't search text
-   *                      tags, attributes, etc)
    */
   search: custom(async function(query, options = { }) {
-    let nodeList;
-    let searchType;
     const searchData = this.searchData = this.searchData || { };
-    const selectorOnly = !!options.selectorOnly;
-
-    if (selectorOnly) {
-      searchType = "selector";
-      nodeList = await this.multiFrameQuerySelectorAll(query);
-    } else {
-      searchType = "search";
-      const result = await this._search(query, options);
-      nodeList = result.list;
-    }
+    const result = await this._search(query, options);
+    const nodeList = result.list;
 
     // If this is a new search, start at the beginning.
-    if (searchData.query !== query ||
-        searchData.selectorOnly !== selectorOnly) {
-      searchData.selectorOnly = selectorOnly;
+    if (searchData.query !== query) {
       searchData.query = query;
       searchData.index = -1;
     }
 
     if (!nodeList.length) {
       return null;
     }
 
@@ -241,17 +227,17 @@ const WalkerFront = FrontClassWithSpec(w
     }
     if (searchData.index < 0) {
       searchData.index = nodeList.length - 1;
     }
 
     // Send back the single node, along with any relevant search data
     const node = await nodeList.item(searchData.index);
     return {
-      type: searchType,
+      type: "search",
       node: node,
       resultsLength: nodeList.length,
       resultsIndex: searchData.index,
     };
   }, {
     impl: "_search"
   }),