rem: var box = permissionsTree.treeBoxObject; var firstRow = box.getFirstVisibleRow(); if (firstRow > (permissions.length - 1) ) { firstRow = permissions.length - 1; } permissionsTreeView.rowCount = permissions.length; box.rowCountChanged(0, permissions.length); box.scrollToRow(firstRow);  
context: function deletePermissions() {  var selections = GetTreeSelections(permissionsTree);    for (var s = selections.length - 1; s >= 0; s--) {    var i = selections[s];    var host = permissions[i].host;    updatePendingRemovals(host);    permissions[i] = null;  }  for (var j = 0; j < permissions.length; j++) {    if (permissions[j] == null) {      var k = j;      while ((k < permissions.length) && (permissions[k] == null)) {        k++;      }      permissions.splice(j, k-j);    }  }  var box = permissionsTree.treeBoxObject;  var firstRow = box.getFirstVisibleRow();  if (firstRow > (permissions.length - 1) ) {    firstRow = permissions.length - 1;  }  permissionsTreeView.rowCount = permissions.length;  box.rowCountChanged(0, permissions.length);  box.scrollToRow(firstRow);  if (permissions.length) {    var nextSelection = (selections[0] < permissions.length) ? selections[0] : permissions.length - 1;    box.view.selection.select(-1);     box.view.selection.select(nextSelection);  }   else {    document.getElementById("removePermission").setAttribute("disabled", "true")    document.getElementById("removeAllPermissions").setAttribute("disabled","true");    permissionsTree.treeBoxObject.view.selection.select(-1);   }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/93cc2f8a6ffe7524680ec99b90a7c2f0cde65a94/permissionsManager.js/buggy/xpfe/components/permissions/content/permissionsManager.js