rem: var obo = outliner.outlinerBoxObject; var bo = obo.outlinerBody.boxObject; 
add: var obo = tree.treeBoxObject; var bo = obo.treeBody.boxObject; 
context:   startDrag: function (aEvent, aDragDropObserver)    {      if (!("onDragStart" in aDragDropObserver))        return;      const kDSIID = Components.interfaces.nsIDragService;      var dragAction = { action: kDSIID.DRAGDROP_ACTION_COPY + kDSIID.DRAGDROP_ACTION_MOVE + kDSIID.DRAGDROP_ACTION_LINK };      var transferData = { data: null };      try         {          aDragDropObserver.onDragStart(aEvent, transferData, dragAction);        }      catch (e)         {          return;  // not a draggable item, bail!        }      if (!transferData.data) return;      transferData = transferData.data;            var transArray = Components.classes["@mozilla.org/supports-array;1"]                                 .createInstance(Components.interfaces.nsISupportsArray);      var region = null;      if (aEvent.originalTarget.localName == "outlinerchildren") {        // let's build the drag region        var outliner = aEvent.originalTarget.parentNode;        try {          region = Components.classes["@mozilla.org/gfx/region;1"].createInstance(Components.interfaces.nsIScriptableRegion);          region.init();          var obo = outliner.outlinerBoxObject;          var bo = obo.outlinerBody.boxObject;          var obosel= obo.selection;          var rowX = bo.x;          var rowY = bo.y;          var rowHeight = obo.rowHeight;          var rowWidth = bo.width;          //add a rectangle for each visible selected row          for (var i = obo.getFirstVisibleRow(); i <= obo.getLastVisibleRow(); i ++)          {            if (obosel.isSelected(i))              region.unionRect(rowX, rowY, rowWidth, rowHeight);            rowY = rowY + rowHeight;          }                //and finally, clip the result to be sure we don't spill over...          region.intersectRect(bo.x, bo.y, bo.width, bo.height);        } catch(ex) {          dump("Error while building selection region: " + ex + "\n");          region = null;        }      }      var count = 0;      do         {          var trans = nsTransferable.set(transferData._XferID == "TransferData"                                          ? transferData                                          : transferData.dataList[count++]);          transArray.AppendElement(trans.QueryInterface(Components.interfaces.nsISupports));        }      while (transferData._XferID == "TransferDataSet" &&              count < transferData.dataList.length);            try {        this.mDragService.invokeDragSession(aEvent.target, transArray, region, dragAction.action);      }      catch(ex) {        // this could be because the user pressed escape to        // cancel the drag. even if it's not, there's not much        // we can do, so be silent.      }      aEvent.preventBubble();    },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/nsDragAndDrop.js/clean/xpfe/global/resources/content/nsDragAndDrop.js