rem: if (gHaveUpdatedToolbarState) { updateComponentBarBroadcaster(); return; } var mainWindow = document.getElementById("main-window"); if (mainWindow.hasAttribute("chromehidden")) { gHaveUpdatedToolbarState = true; var i; for (i = 0; i < toolbarMenuElt.childNodes.length; ++i) document.getElementById(toolbarMenuElt.childNodes[i].getAttribute("observes")).removeAttribute("checked"); var toolbars = document.getElementsByTagName("toolbar"); for (i = 0; i < toolbars.length; ++i) { if (toolbars[i].getAttribute("class").indexOf("chromeclass") != -1) toolbars[i].setAttribute("hidden", "true"); 
add: if (!gHaveUpdatedToolbarState) { var mainWindow = document.getElementById("main-window"); if (mainWindow.hasAttribute("chromehidden")) { gHaveUpdatedToolbarState = true; var i; for (i = 0; i < toolbarMenuElt.childNodes.length; ++i) document.getElementById(toolbarMenuElt.childNodes[i].getAttribute("observes")).removeAttribute("checked"); var toolbars = document.getElementsByTagName("toolbar"); for (i = 0; i < toolbars.length; ++i) { if (toolbars[i].getAttribute("class").indexOf("chromeclass") != -1) toolbars[i].setAttribute("hidden", "true"); } var statusbars = document.getElementsByTagName("statusbar"); for (i = 0; i < statusbars.length; ++i) { if (statusbars[i].getAttribute("class").indexOf("chromeclass") != -1) statusbars[i].setAttribute("hidden", "true"); } mainWindow.removeAttribute("chromehidden"); 
context: function updateToolbarStates(toolbarMenuElt){  if (gHaveUpdatedToolbarState) {    updateComponentBarBroadcaster();    return;  }  var mainWindow = document.getElementById("main-window");  if (mainWindow.hasAttribute("chromehidden")) {    gHaveUpdatedToolbarState = true;    var i;    for (i = 0; i < toolbarMenuElt.childNodes.length; ++i)      document.getElementById(toolbarMenuElt.childNodes[i].getAttribute("observes")).removeAttribute("checked");    var toolbars = document.getElementsByTagName("toolbar");    for (i = 0; i < toolbars.length; ++i) {      if (toolbars[i].getAttribute("class").indexOf("chromeclass") != -1)        toolbars[i].setAttribute("hidden", "true");    }    var statusbars = document.getElementsByTagName("statusbar");    for (i = 0; i < statusbars.length; ++i) {      if (statusbars[i].getAttribute("class").indexOf("chromeclass") != -1)        statusbars[i].setAttribute("hidden", "true");    }    mainWindow.removeAttribute("chromehidden");  }  updateComponentBarBroadcaster();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/cf38af930dd43f3684917114f41e530a681f42ef/navigator.js/buggy/suite/browser/navigator.js