Bug 1393289 - Port Bug 831094 to SeaMonkey. Remove no longer called nodeReplaced function. r=IanN

This commit is contained in:
Frank-Rainer Grahl 2017-08-25 03:50:31 +02:00
Родитель 713513ca19
Коммит abbc2277f8
3 изменённых файлов: 0 добавлений и 81 удалений

Просмотреть файл

@ -599,24 +599,6 @@ PlacesTreeView.prototype = {
}
},
/**
* Be careful, the parameter 'aIndex' here specifies the node's index in the
* parent node, not the visible index.
*/
nodeReplaced:
function PTV_nodeReplaced(aParentNode, aOldNode, aNewNode, aIndexDoNotUse) {
NS_ASSERT(this._result, "Got a notification but have no result!");
if (!this._tree || !this._result)
return;
// Nothing to do if the replaced node was not set.
var row = this._getRowForNode(aOldNode);
if (row != -1) {
this._rows[row] = aNewNode;
this._tree.invalidateRow(row);
}
},
// This is _invalidateCellValue in the original implementation.
invalidateNode: function PTV_invalidateNode(aNode) {
NS_ASSERT(this._result, "Got a notification but have no result!");

Просмотреть файл

@ -574,26 +574,6 @@ PlacesViewBase.prototype = {
}
},
nodeReplaced:
function PVB_nodeReplaced(aParentPlacesNode, aOldPlacesNode, aNewPlacesNode, aIndex) {
let parentElt = this._getDOMNodeForPlacesNode(aParentPlacesNode);
if (parentElt._built) {
let elt = this._getDOMNodeForPlacesNode(aOldPlacesNode);
// Here we need the <menu>.
if (elt.localName == "menupopup")
elt = elt.parentNode;
elt.remove();
// No worries: If elt is the last item (i.e. no nextSibling),
// _insertNewItem/_insertNewItemToPopup will insert the new element as
// the last item.
let nextElt = elt.nextSibling;
this._insertNewItemToPopup(aNewPlacesNode, parentElt, nextElt);
}
},
nodeHistoryDetailsChanged:
function PVB_nodeHistoryDetailsChanged(aPlacesNode, aTime, aCount) {
if (aPlacesNode.parent &&
@ -1231,31 +1211,6 @@ PlacesToolbar.prototype = {
}
},
nodeReplaced:
function PT_nodeReplaced(aParentPlacesNode,
aOldPlacesNode, aNewPlacesNode, aIndex) {
let parentElt = this._getDOMNodeForPlacesNode(aParentPlacesNode);
if (parentElt == this._rootElt) {
let elt = this._getDOMNodeForPlacesNode(aOldPlacesNode);
// Here we need the <menu>.
if (elt.localName == "menupopup")
elt = elt.parentNode;
this._removeChild(elt);
// No worries: If elt is the last item (i.e. no nextSibling),
// _insertNewItem/_insertNewItemToPopup will insert the new element as
// the last item.
let next = elt.nextSibling;
this._insertNewItem(aNewPlacesNode, next);
this.updateChevron();
return;
}
PlacesViewBase.prototype.nodeReplaced.apply(this, arguments);
},
invalidateContainer: function PT_invalidateContainer(aPlacesNode) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
if (elt == this._rootElt) {

Просмотреть файл

@ -733,24 +733,6 @@ PlacesTreeView.prototype = {
}
},
/**
* Be careful, the parameter 'aIndex' here specifies the node's index in the
* parent node, not the visible index.
*/
nodeReplaced:
function PTV_nodeReplaced(aParentNode, aOldNode, aNewNode, aIndexDoNotUse) {
NS_ASSERT(this._result, "Got a notification but have no result!");
if (!this._tree || !this._result)
return;
// Nothing to do if the replaced node was not set.
var row = this._getRowForNode(aOldNode);
if (row != -1) {
this._rows[row] = aNewNode;
this._tree.invalidateRow(row);
}
},
_invalidateCellValue: function PTV__invalidateCellValue(aNode,
aColumnType) {
NS_ASSERT(this._result, "Got a notification but have no result!");