rem:  var dpi = 96; try { dpi = prefBranch.getIntPref("browser.display.screen_resolution"); } catch(ex) { } 
add:  var b = document.createElement("box"); b.style.width = "1in"; var dpi = window.getComputedStyle(b, null).width.match(/^\d+/); 
context: function getDefaultFontSize(){    const PREF_CTRID = "@mozilla.org/preferences-service;1";    const nsIPrefService = Components.interfaces.nsIPrefService;    const nsIPrefBranch = Components.interfaces.nsIPrefBranch;        var prefService =        Components.classes[PREF_CTRID].getService(nsIPrefService);    var prefBranch = prefService.getBranch(null);        // PX size pref: font.size.variable.x-western    var pxSize = 16;    try    {        pxSize = prefBranch.getIntPref("font.size.variable.x-western");    }    catch(ex) { }        // DPI pref    : browser.display.screen_resolution    var dpi = 96;    try    {        dpi = prefBranch.getIntPref("browser.display.screen_resolution");    }    catch(ex) { }        return Math.round((pxSize / dpi) * 72);}
meta: 3298	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3298/8f4273e298c04ea837417defc968c33e118c8689/static.js/buggy/xul/content/static.js