Bug 636924 - Copied livemarks appear as folders in sidebar; r=dietrich
authorAsaf Romano <mano@mozilla.com>
Tue, 22 Mar 2011 10:55:47 -0400
changeset 63630 b6d89aa5c8c4610c6f970e99de844adbe18293f7
parent 63449 a7346f028fd62b347f2e15e9b8d89d1ad95adc4b
child 63631 8a61e8610d6684005e3db4ec97bf9c9e9779d82e
push id19248
push usereakhgari@mozilla.com
push dateWed, 23 Mar 2011 23:19:35 +0000
treeherdermozilla-central@ab95ab9e389b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs636924
milestone2.0b13pre
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 636924 - Copied livemarks appear as folders in sidebar; r=dietrich
browser/components/places/content/browserPlacesViews.js
browser/components/places/content/treeView.js
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -462,17 +462,17 @@ PlacesViewBase.prototype = {
       elt.removeAttribute("image");
     else if (icon != elt.getAttribute("image"))
       elt.setAttribute("image", icon);
   },
 
   nodeAnnotationChanged:
   function PVB_nodeAnnotationChanged(aPlacesNode, aAnno) {
     // All livemarks have a feedURI, so use it as our indicator.
-    if (aAnno == "livemark/feedURI") {
+    if (aAnno == PlacesUtils.LMANNO_FEEDURI) {
       let elt = aPlacesNode._DOMElement;
       if (!elt)
         throw "aPlacesNode must have _DOMElement set";
 
       let menu = elt.parentNode;
       if (!menu.hasAttribute("livemark"))
         menu.setAttribute("livemark", "true");
 
@@ -1155,17 +1155,17 @@ PlacesToolbar.prototype = {
     // We're notified for the menupopup, not the containing toolbarbutton.
     if (elt.localName == "menupopup")
       elt = elt.parentNode;
 
     if (elt.parentNode == this._rootElt) {
       // Node is on the toolbar.
 
       // All livemarks have a feedURI, so use it as our indicator.
-      if (aAnno == "livemark/feedURI") {
+      if (aAnno == PlacesUtils.LMANNO_FEEDURI) {
         elt.setAttribute("livemark", true);
       }
       return;
     }
 
     PlacesViewBase.prototype.nodeAnnotationChanged.apply(this, arguments);
   },
 
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -836,18 +836,22 @@ PlacesTreeView.prototype = {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_TAGS);
   },
 
   nodeKeywordChanged: function PTV_nodeKeywordChanged(aNode, aNewKeyword) {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_KEYWORD);
   },
 
   nodeAnnotationChanged: function PTV_nodeAnnotationChanged(aNode, aAnno) {
-    if (aAnno == PlacesUIUtils.DESCRIPTION_ANNO)
+    if (aAnno == PlacesUIUtils.DESCRIPTION_ANNO) {
       this._invalidateCellValue(aNode, this.COLUMN_TYPE_DESCRIPTION);
+    } else if (aAnno == PlacesUtils.LMANNO_FEEDURI) {
+      // The livemark attribute is set as a cell property on the title cell.
+      this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
+    }
   },
 
   nodeDateAddedChanged: function PTV_nodeDateAddedChanged(aNode, aNewValue) {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_DATEADDED);
   },
 
   nodeLastModifiedChanged:
   function PTV_nodeLastModifiedChanged(aNode, aNewValue) {