Bug 1378089 - Part 6. Make the new All Bookmarks folder query only update on the mobile folder status change for better performance. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Mon, 07 May 2018 12:41:29 +0200
changeset 31462 a414897db0d9
parent 31461 d743fc6395f8
child 31463 dc4acdaa5df1
push id383
push userclokep@gmail.com
push date2018-05-07 21:52 +0000
reviewersIanN, IanN
bugs1378089, 1423896
Bug 1378089 - Part 6. Make the new All Bookmarks folder query only update on the mobile folder status change for better performance. r=IanN a=IanN Port Bug 1423896 [Make the All Bookmarks folder for the left pane a virtual query].
suite/common/places/content/treeView.js
--- a/suite/common/places/content/treeView.js
+++ b/suite/common/places/content/treeView.js
@@ -187,23 +187,20 @@ PlacesTreeView.prototype = {
     }
 
     // Ensure that the entire chain is open, otherwise that node is invisible.
     for (let ancestor of ancestors) {
       if (!ancestor.containerOpen)
         throw new Error("Invisible node passed to _getRowForNode");
     }
 
-    // Non-plain containers, and non-Roots queries are initially built with their
-    // contents.
+    // Non-plain containers are initially built with their contents.
     let parent = aNode.parent;
     let parentIsPlain = this._isPlainContainer(parent);
-    if (!parentIsPlain &&
-        parent.queryOptions.resultType !=
-        Ci.nsINavHistoryQueryOptions.RESULTS_AS_ROOTS_QUERY) {
+    if (!parentIsPlain) {
       if (parent == this._rootNode) {
         return this._rows.indexOf(aNode);
       }
 
       return this._rows.indexOf(aNode, aParentRow);
     }
 
     let row = -1;