Bug 1456589 - Part 1 Port Bug 1437651 [Remove unused simulated-places-node references]. r=IanN
This commit is contained in:
Родитель
90668064a8
Коммит
43e92ac762
|
@ -908,8 +908,7 @@ PlacesViewBase.prototype = {
|
|||
break;
|
||||
}
|
||||
|
||||
if (child._placesNode && !child.hasAttribute("simulated-places-node") &&
|
||||
!firstNonStaticNodeFound) {
|
||||
if (child._placesNode && !firstNonStaticNodeFound) {
|
||||
firstNonStaticNodeFound = true;
|
||||
aPopup.insertBefore(aPopup._startMarker, child);
|
||||
}
|
||||
|
|
|
@ -1410,23 +1410,16 @@ var PlacesControllerDragHelper = {
|
|||
* A XUL DOM node.
|
||||
* @return True if the node can be moved, false otherwise.
|
||||
*/
|
||||
canMoveNode(aNode, aView, aDOMNode) {
|
||||
canMoveNode(aNode, aView) {
|
||||
// Only bookmark items are movable.
|
||||
if (aNode.itemId == -1)
|
||||
return false;
|
||||
|
||||
let parentNode = aNode.parent;
|
||||
if (!parentNode) {
|
||||
// Normally parentless places nodes can not be moved,
|
||||
// but simulated bookmarked URI nodes are special.
|
||||
return !!aDOMNode &&
|
||||
aDOMNode.hasAttribute("simulated-places-node") &&
|
||||
PlacesUtils.nodeIsBookmark(aNode);
|
||||
}
|
||||
|
||||
// Once tags and bookmarked are divorced, the tag-query check should be
|
||||
// removed.
|
||||
return PlacesUtils.nodeIsFolder(parentNode) &&
|
||||
let parentNode = aNode.parent;
|
||||
return parentNode != null &&
|
||||
PlacesUtils.nodeIsFolder(parentNode) &&
|
||||
!PlacesUIUtils.isFolderReadOnly(parentNode, aView) &&
|
||||
!PlacesUtils.nodeIsTagQuery(parentNode);
|
||||
},
|
||||
|
|
|
@ -350,7 +350,7 @@
|
|||
|
||||
// Force a copy action if parent node is a query or we are dragging a
|
||||
// not-removable node.
|
||||
if (!PlacesControllerDragHelper.canMoveNode(draggedElt, this._rootView, elt))
|
||||
if (!PlacesControllerDragHelper.canMoveNode(draggedElt, this._rootView))
|
||||
event.dataTransfer.effectAllowed = "copyLink";
|
||||
|
||||
// Activate the view and cache the dragged element.
|
||||
|
|
Загрузка…
Ссылка в новой задаче