diff --git a/browser/components/places/content/tree.xml b/browser/components/places/content/tree.xml index 1fb5a8272985..0e2b920ae06c 100644 --- a/browser/components/places/content/tree.xml +++ b/browser/components/places/content/tree.xml @@ -45,7 +45,7 @@ diff --git a/browser/components/places/content/treeView.js b/browser/components/places/content/treeView.js index 2616c8f9d7da..23e853d5d544 100644 --- a/browser/components/places/content/treeView.js +++ b/browser/components/places/content/treeView.js @@ -14,6 +14,8 @@ function PlacesTreeView(aFlatList, aOnOpenFlatContainer, aController) { } PlacesTreeView.prototype = { + get wrappedJSObject() this, + _makeAtom: function PTV__makeAtom(aString) { return Cc["@mozilla.org/atom-service;1"]. getService(Ci.nsIAtomService). @@ -1087,11 +1089,13 @@ PlacesTreeView.prototype = { this._result = val; this._rootNode = this._result.root; this._cellProperties = new WeakMap(); + this._cuttingNodes = new Set(); } else if (this._result) { delete this._result; delete this._rootNode; delete this._cellProperties; + delete this._cuttingNodes; } // If the tree is not set yet, setTree will call finishInit. @@ -1150,7 +1154,7 @@ PlacesTreeView.prototype = { let node = this._getNodeForRow(aRow); - if (node._cutting) { + if (this._cuttingNodes.has(node)) { aProperties.AppendElement(this._getAtomFor("cutting")); } @@ -1681,6 +1685,18 @@ PlacesTreeView.prototype = { } }, + toggleCutNode: function PTV_toggleCutNode(aNode, aValue) { + let currentVal = this._cuttingNodes.has(aNode); + if (currentVal != aValue) { + if (aValue) + this._cuttingNodes.add(aNode); + else + this._cuttingNodes.delete(aNode); + + this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE); + } + }, + selectionChanged: function() { }, cycleCell: function(aRow, aColumn) { }, isSelectable: function(aRow, aColumn) { return false; },