rem: for (var i=0;i<gPaperArray.length;i++) { if (print_paper_width == gPaperArray[i].width && print_paper_height == gPaperArray[i].height) { 
add: var tolerance = 10.0; for (var i=0;i<gPaperArray.length;i++) {  if ((Math.abs(print_paper_width_mm  - gPaperArray[i].width_mm)  <= tolerance) && (Math.abs(print_paper_height_mm - gPaperArray[i].height_mm) <= tolerance)) { 
context: function loadDialog(){  var print_paper_type    = 0;  var print_paper_unit    = 0;  var print_paper_width   = 0.0;  var print_paper_height  = 0.0;  var print_color         = true;  var print_command       = default_command;  if (gPrintSettings) {    print_paper_type   = gPrintSettings.paperSizeType;    print_paper_unit   = gPrintSettings.paperSizeUnit;    print_paper_width  = gPrintSettings.paperWidth;    print_paper_height = gPrintSettings.paperHeight;    print_color     = gPrintSettings.printInColor;    print_command   = gPrintSettings.printCommand;  }  if (doDebug) {    dump("loadDialog******************************\n");    dump("paperSizeType "+print_paper_unit+"\n");    dump("paperWidth    "+print_paper_width+"\n");    dump("paperHeight   "+print_paper_height+"\n");    dump("printInColor  "+print_color+"\n");    dump("printCommand  "+print_command+"\n");  }  createPaperArray();  var selectedInx = 0;  for (var i=0;i<gPaperArray.length;i++) {    if (print_paper_width == gPaperArray[i].width && print_paper_height == gPaperArray[i].height) {      selectedInx = i;      break;    }  }  createPaperSizeList(selectedInx);  if (print_command == "") {    print_command = default_command;  }  if (print_color) {    dialog.colorGroup.selectedItem = dialog.colorRadio;  } else {    dialog.colorGroup.selectedItem = dialog.grayRadio;  }  dialog.cmdInput.value = print_command;  try {    var pref = Components.classes["@mozilla.org/preferences-service;1"]                         .getService(Components.interfaces.nsIPrefBranch);    dialog.topInput.value    = pref.getIntPref("print.print_edge_top") / 100.0;    dialog.bottomInput.value = pref.getIntPref("print.print_edge_left") / 100.0;    dialog.leftInput.value   = pref.getIntPref("print.print_edge_right") / 100.0;    dialog.rightInput.value  = pref.getIntPref("print.print_edge_bottom") / 100.0;  } catch (e) {    dialog.topInput.value    = "0.04";    dialog.bottomInput.value = "0.04";    dialog.leftInput.value   = "0.04";    dialog.rightInput.value  = "0.04";  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/1f0a883e6cd30b4e3e0b17e272460cd7ebbfd96c/printjoboptions.js/clean/xpfe/global/resources/content/unix/printjoboptions.js