Bug 1393289 - Port Bug 831094 to SeaMonkey. Remove no longer called nodeReplaced function. r=IanN
This commit is contained in:
Родитель
713513ca19
Коммит
abbc2277f8
|
@ -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.
|
// This is _invalidateCellValue in the original implementation.
|
||||||
invalidateNode: function PTV_invalidateNode(aNode) {
|
invalidateNode: function PTV_invalidateNode(aNode) {
|
||||||
NS_ASSERT(this._result, "Got a notification but have no result!");
|
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:
|
nodeHistoryDetailsChanged:
|
||||||
function PVB_nodeHistoryDetailsChanged(aPlacesNode, aTime, aCount) {
|
function PVB_nodeHistoryDetailsChanged(aPlacesNode, aTime, aCount) {
|
||||||
if (aPlacesNode.parent &&
|
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) {
|
invalidateContainer: function PT_invalidateContainer(aPlacesNode) {
|
||||||
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
|
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
|
||||||
if (elt == this._rootElt) {
|
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,
|
_invalidateCellValue: function PTV__invalidateCellValue(aNode,
|
||||||
aColumnType) {
|
aColumnType) {
|
||||||
NS_ASSERT(this._result, "Got a notification but have no result!");
|
NS_ASSERT(this._result, "Got a notification but have no result!");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче