diff --git a/browser/components/places/content/menu.xml b/browser/components/places/content/menu.xml index 1e33e6e1d87..5b096d9454f 100755 --- a/browser/components/places/content/menu.xml +++ b/browser/components/places/content/menu.xml @@ -257,6 +257,7 @@ if (element) { element.node = child; + element.node.viewIndex = 0; if (child.icon) element.setAttribute("image", child.icon.spec); diff --git a/browser/components/places/content/toolbar.xml b/browser/components/places/content/toolbar.xml index 6a39372381e..0c3ca2bc2ff 100755 --- a/browser/components/places/content/toolbar.xml +++ b/browser/components/places/content/toolbar.xml @@ -238,6 +238,7 @@ button.setAttribute("image", child.icon.spec); button.className = "menuitem-iconic bookmark-item"; button.node = child; + button.node.viewIndex = 0; if (before) this.insertBefore(button, before); else @@ -521,7 +522,10 @@ else if (PlacesUtils.nodeIsContainer(aNode)) { if (PlacesUtils.nodeIsLivemarkContainer(aNode)) { var folder = aNode.itemId; - var siteURIString = PlacesUtils.livemarks.getSiteURI(folder).spec; + var siteURIString = ""; + var siteURI = PlacesUtils.livemarks.getSiteURI(folder); + if (siteURI) + siteURIString = siteURI.spec; if (siteURIString) { if (button.getAttribute("siteURI") != siteURIString) button.setAttribute("siteURI", siteURIString); diff --git a/toolkit/components/places/public/nsINavHistoryService.idl b/toolkit/components/places/public/nsINavHistoryService.idl index f82310f4978..4528a3cf03e 100644 --- a/toolkit/components/places/public/nsINavHistoryService.idl +++ b/toolkit/components/places/public/nsINavHistoryService.idl @@ -134,8 +134,13 @@ interface nsINavHistoryResultNode : nsISupports /** * Value with undefined meaning for use by the view. Its initial value will - * be -1. The tree view uses this value to indicate the row in the tree that - * this node is at. Other views may use this value however they choose. + * be -1. The result implementation treats nodes with this property set to + * -1 as invisible! + * + * View-implementations may use this value to track the node index in the + * view, e.g. the tree view uses this value to indicate the row in the + * tree that this node is at. Other views may choose not to use this, but + * should inititalize this value to anything but -1 for visible nodes. */ attribute long viewIndex;