B2G/gecko/browser/components/places/content/controller.js
/**
   * Determines if a node can be moved.
   *
   * @param   aNode
   *          A nsINavHistoryResultNode node.
   * @returns True if the node can be moved, false otherwise.
   */
Determines if a node can be moved.
@param   aNode
A nsINavHistoryResultNode node.
@returns True if the node can be moved, false otherwise.
Determines if a node can be moved . @param aNode A nsINavHistoryResultNode node . @returns True if the node can be moved false otherwise .
function PCDH_canMoveNode(aNode) {
    if (!aNode.parent)
      return false;
    let parentId = PlacesUtils.getConcreteItemId(aNode.parent);
    let concreteId = PlacesUtils.getConcreteItemId(aNode);
    if (PlacesUtils.nodeIsTagQuery(aNode.parent))
      return false;
    if (PlacesUtils.nodeIsReadOnly(aNode.parent))
      return false;
    if (PlacesUtils.nodeIsContainer(aNode) &&
        !this.canMoveContainer(aNode.itemId, parentId))
      return false;
    return true;
  }
function PCDH_canMoveNode ( aNode ) { if ( ! aNode . parent ) return false ; let parentId = PlacesUtils . getConcreteItemId ( aNode . parent ) ; let concreteId = PlacesUtils . getConcreteItemId ( aNode ) ; if ( PlacesUtils . nodeIsTagQuery ( aNode . parent ) ) return false ; if ( PlacesUtils . nodeIsReadOnly ( aNode . parent ) ) return false ; if ( PlacesUtils . nodeIsContainer ( aNode ) && ! this . canMoveContainer ( aNode . itemId , parentId ) ) return false ; return true ; }
Determines if a node can be moved.
Determines if a node can be moved .
// Can't move query root. // Can't move children of tag containers. // Can't move children of read-only containers. // Check for special folders, etc.