Bug 1388827 - Part 1. Port Bug 1368754 to SeaMonkey. Change HistoryDetailsChanged/NodeURIChanged to be called with the old time/access count/uri rather than the new ones. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Mon, 11 Sep 2017 21:57:31 +0200
changeset 28594 7b8482df32d4f1ffefacc56afae2555a2cc2d57c
parent 28593 eb4b5c610b215fb4f989be10d6c5bd85fb7fd264
child 28595 1817c516d5099ef1244f64b980129fdb7fc407d7
push idunknown
push userunknown
push dateunknown
reviewersIanN, IanN
bugs1388827, 1368754
Bug 1388827 - Part 1. Port Bug 1368754 to SeaMonkey. Change HistoryDetailsChanged/NodeURIChanged to be called with the old time/access count/uri rather than the new ones. r=IanN a=IanN
suite/common/history/treeView.js
suite/common/places/browserPlacesViews.js
suite/common/places/treeView.js
--- a/suite/common/history/treeView.js
+++ b/suite/common/history/treeView.js
@@ -606,23 +606,23 @@ PlacesTreeView.prototype = {
     if (this._tree && viewIndex >= 0)
       this._tree.invalidateRow(viewIndex);
   },
 
   nodeTitleChanged: function PTV_nodeTitleChanged(aNode, aNewTitle) {
     this.invalidateNode(aNode);
   },
 
-  nodeURIChanged: function PTV_nodeURIChanged(aNode, aNewURI) { },
+  nodeURIChanged: function PTV_nodeURIChanged(aNode, aOldURI) { },
 
   nodeIconChanged: function PTV_nodeIconChanged(aNode) { },
 
   nodeHistoryDetailsChanged:
-  function PTV_nodeHistoryDetailsChanged(aNode, aUpdatedVisitDate,
-                                         aUpdatedVisitCount) {
+  function PTV_nodeHistoryDetailsChanged(aNode, aOldVisitDate,
+                                         aOldVisitCount) {
     this.invalidateNode(aNode);
   },
 
   nodeTagsChanged: function PTV_nodeTagsChanged(aNode) { },
 
   nodeKeywordChanged: function PTV_nodeKeywordChanged(aNode, aNewKeyword) { },
 
   nodeAnnotationhanged: function PTV_nodeAnnotationhanged(aNode, aAnno) { },
--- a/suite/common/places/browserPlacesViews.js
+++ b/suite/common/places/browserPlacesViews.js
@@ -481,17 +481,17 @@ PlacesViewBase.prototype = {
 
   nodeURIChanged: function PVB_nodeURIChanged(aPlacesNode, aURIString) {
     let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
 
     // Here we need the <menu>.
     if (elt.localName == "menupopup")
       elt = elt.parentNode;
 
-    elt.setAttribute("scheme", PlacesUIUtils.guessUrlSchemeForUI(aURIString));
+    elt.setAttribute("scheme", PlacesUIUtils.guessUrlSchemeForUI(aPlacesNode.uri));
   },
 
   nodeIconChanged: function PVB_nodeIconChanged(aPlacesNode) {
     let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
 
     // There's no UI representation for the root node, thus there's nothing to
     // be done when the icon changes.
     if (elt == this._rootElt)
@@ -578,17 +578,17 @@ PlacesViewBase.prototype = {
   function PVB_nodeHistoryDetailsChanged(aPlacesNode, aTime, aCount) {
     if (aPlacesNode.parent &&
         this.controller.hasCachedLivemarkInfo(aPlacesNode.parent)) {
       // Find the node in the parent.
       let popup = this._getDOMNodeForPlacesNode(aPlacesNode.parent);
       for (let i = popup._startMarker; i < popup.childNodes.length; i++) {
         let child = popup.childNodes[i];
         if (child._placesNode && child._placesNode.uri == aPlacesNode.uri) {
-          if (aCount)
+          if (aPlacesNode.accessCount)
             child.setAttribute("visited", "true");
           else
             child.removeAttribute("visited");
           break;
         }
       }
     }
   },
--- a/suite/common/places/treeView.js
+++ b/suite/common/places/treeView.js
@@ -773,27 +773,27 @@ PlacesTreeView.prototype = {
         this.nodeInserted(placesNode, children[i], i);
     }, () => undefined);
   },
 
   nodeTitleChanged: function PTV_nodeTitleChanged(aNode, aNewTitle) {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
   },
 
-  nodeURIChanged: function PTV_nodeURIChanged(aNode, aNewURI) {
+  nodeURIChanged: function PTV_nodeURIChanged(aNode, aOldURI) {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_URI);
   },
 
   nodeIconChanged: function PTV_nodeIconChanged(aNode) {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
   },
 
   nodeHistoryDetailsChanged:
-  function PTV_nodeHistoryDetailsChanged(aNode, aUpdatedVisitDate,
-                                         aUpdatedVisitCount) {
+  function PTV_nodeHistoryDetailsChanged(aNode, aOldVisitDate,
+                                         aOldVisitCount) {
     if (aNode.parent && this._controller.hasCachedLivemarkInfo(aNode.parent)) {
       // Find the node in the parent.
       let parentRow = this._flatList ? 0 : this._getRowForNode(aNode.parent);
       for (let i = parentRow; i < this._rows.length; i++) {
         let child = this.nodeForTreeIndex(i);
         if (child.uri == aNode.uri) {
           this._cellProperties.delete(child);
           this._invalidateCellValue(child, this.COLUMN_TYPE_TITLE);