Bug 1068671 - Fix review comment (comment 15 on the bug) and a couple of typos. r=mak
☠☠ backed out by 7673c749c2c7 ☠ ☠
authorAsaf Romano <mano@mozilla.com>
Wed, 01 Oct 2014 12:59:11 +0300
changeset 208164 5a6b95c47b5523a2f99959e2428688dacbfb9c10
parent 208163 b30d47d94a85ac717dbd0b8942f435b195b2c42f
child 208165 3cc898b3ef5d0faa76ac5092b0d7a9997f9db100
push id27579
push userkwierso@gmail.com
push dateWed, 01 Oct 2014 23:02:13 +0000
treeherderautoland@f771fd927304 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1068671
milestone35.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 1068671 - Fix review comment (comment 15 on the bug) and a couple of typos. r=mak
browser/components/places/content/menu.xml
browser/components/places/content/treeView.js
--- a/browser/components/places/content/menu.xml
+++ b/browser/components/places/content/menu.xml
@@ -102,17 +102,17 @@
                   elt.lastChild.hasAttribute("placespopup"))
                 dropPoint.folderElt = elt;
               return dropPoint;
             }
 
             let tagName = PlacesUtils.nodeIsTagQuery(elt._placesNode) ?
                             elt._placesNode.title : null;
             if ((PlacesUtils.nodeIsFolder(elt._placesNode) &&
-                 !PlacesUIUtils.isContentsReadOnly(elt._placesNode) ||
+                 !PlacesUIUtils.isContentsReadOnly(elt._placesNode)) ||
                 PlacesUtils.nodeIsTagQuery(elt._placesNode)) {
               // This is a folder or a tag container.
               if (eventY - eltY < eltHeight * 0.20) {
                 // If mouse is in the top part of the element, drop above folder.
                 dropPoint.ip = new InsertionPoint(
                                     PlacesUtils.getConcreteItemId(resultNode),
                                     -1,
                                     Ci.nsITreeView.DROP_BEFORE,
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -1669,19 +1669,19 @@ PlacesTreeView.prototype = {
     // * separators
     //
     // Note that concrete itemIds aren't used intentionally.  For example, we
     // have no reason to disallow renaming a shortcut to the Bookmarks Toolbar,
     // except for the one under All Bookmarks.
     if (PlacesUtils.nodeIsSeparator(node) || PlacesUtils.isRootItem(itemId))
       return false;
 
-    let parentId = node.parent.itemId;
+    let parentId = PlacesUtils.getConcreteItemId(node.parent);
     if (parentId == PlacesUIUtils.leftPaneFolderId ||
-        parentId == PlacesUIUtils.allBallBookmarksFolderId) {
+        parentId == PlacesUIUtils.allBookmarksFolderId) {
       // Note that the for the time being this is the check that actually
       // blocks renaming places "roots", and not the isRootItem check above.
       // That's because places root are only exposed through folder shortcuts
       // descendants of the left pane folder.
       return false;
     }
 
     return true;