context: function SetFields( aDataObject )  {    languageData = "languageData" in aDataObject ? aDataObject.languageData : languageData ;    currentLanguage = "currentLanguage" in aDataObject ? aDataObject.currentLanguage : null ;    var lists = ["selectLangs", "proportionalFont"];    var prefvalue;        for( var i = 0; i < lists.length; i++ )      {        var element = document.getElementById( lists[i] );        if( "dataEls" in aDataObject )          {            element.selectedItem = element.getElementsByAttribute( "value", aDataObject.dataEls[ lists[i] ].value )[0];          }        else          {            var prefstring = element.getAttribute( "prefstring" );            var preftype = element.getAttribute( "preftype" );            if( prefstring && preftype )              {                prefvalue = gPrefWindow.getPref( preftype, prefstring );                element.selectedItem = element.getElementsByAttribute( "value", prefvalue )[0];              }          }      }    var screenResolution = document.getElementById( "screenResolution" );    var resolution;        if( "fontDPI" in aDataObject )      {        resolution = aDataObject.fontDPI;      }    else      {        prefvalue = gPrefWindow.getPref( "int", "browser.display.screen_resolution" );        if( prefvalue != "!/!ERROR_UNDEFINED_PREF!/!" )            resolution = prefvalue;        else            resolution = 96; // If it all goes horribly wrong, fall back on 96.      }        setResolution( resolution );        if ( gPrefWindow.getPrefIsLocked( "browser.display.screen_resolution" ) ) {        screenResolution.disabled = true;    }    if ( gPrefWindow.getPrefIsLocked( "browser.display.use_document_fonts" ) ) {        useMyFontsCheckbox.disabled = true;    }   if ("dataEls" in aDataObject) {     document.getElementById("foregroundtextmenu").color = aDataObject.dataEls["foregroundText"].value     document.getElementById("backgroundmenu").color = aDataObject.dataEls["background"].value;     document.getElementById("unvisitedlinkmenu").color = aDataObject.dataEls["unvisitedLinks"].value;     document.getElementById("visitedlinkmenu").color = aDataObject.dataEls["visitedLinks"].value;      document.getElementById("browserUseSystemColors").checked = aDataObject.dataEls["browserUseSystemColors"].checked;     document.getElementById("browserUnderlineAnchors").checked = aDataObject.dataEls["browserUnderlineAnchors"].checked;     document.getElementById("useMyColors").checked = aDataObject.dataEls["useMyColors"].checked;     document.getElementById("useMyFonts").checked = aDataObject.dataEls["useMyFonts"].checked;   }   else {     var elt, prefstring;     var checkboxes = ["browserUseSystemColors", "browserUnderlineAnchors"];     for (i = 0; i < checkboxes.length; ++i) {       elt = document.getElementById(checkboxes[i]);       prefstring = elt.getAttribute( "prefstring" );       if( prefstring  ) {         prefvalue = gPrefWindow.getPref( "bool", prefstring );         elt.checked = prefvalue;       }     }     var colors = ["foregroundtextmenu", "backgroundmenu", "unvisitedlinkmenu", "visitedlinkmenu"];     for (i = 0; i < colors.length; ++i) {       elt = document.getElementById(colors[i]);       prefstring = elt.nextSibling.getAttribute("prefstring");       if (prefstring) {         prefvalue = gPrefWindow.getPref("color", prefstring);         elt.color = prefvalue;       }     }     var useDocColors = gPrefWindow.getPref("bool", "browser.display.use_document_colors");     document.getElementById("useMyColors").checked = !useDocColors;     var useDocFonts = gPrefWindow.getPref("int", "browser.display.use_document_fonts");     document.getElementById("useMyFonts").checked = !useDocFonts;   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/bb60ef80009aa9aa5364d109a62d1d181aef73f9/pref-fonts.js/buggy/browser/components/prefwindow/content/pref-fonts.js