rem: for (var i = 0; i < styleSheets.length; ++i) { var currentStyleSheet = styleSheets[i];  if (currentStyleSheet.title) { if (!currentStyleSheet.disabled) altStyleSelected = true;  var lastWithSameTitle = null; if (currentStyleSheet.title in currentStyleSheets) lastWithSameTitle = currentStyleSheets[currentStyleSheet.title];  if (!lastWithSameTitle) { var menuItem = document.createElement("menuitem"); menuItem.setAttribute("type", "radio"); menuItem.setAttribute("label", currentStyleSheet.title); menuItem.setAttribute("data", currentStyleSheet.title); menuItem.setAttribute("checked", !currentStyleSheet.disabled && !styleDisabled); menuPopup.appendChild(menuItem); currentStyleSheets[currentStyleSheet.title] = menuItem; } else { if (currentStyleSheet.disabled) lastWithSameTitle.removeAttribute("checked"); } } } menuPopup.firstChild.setAttribute("checked", styleDisabled); itemPersistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled); itemPersistentOnly.hidden = (window.content.document.preferredStyleSheetSet) ? true : false; 
add: stylesheetFillAll(menuPopup, window.content, styleDisabled, itemPersistentOnly); 
context: function stylesheetFillPopup(menuPopup){  /* Clear menu */  var itemPersistentOnly = menuPopup.firstChild.nextSibling;  while (itemPersistentOnly.nextSibling)    menuPopup.removeChild(itemPersistentOnly.nextSibling);  var styleSheets = getAllStyleSheets(window.content);  var currentStyleSheets = [];  var styleDisabled = getMarkupDocumentViewer().authorStyleDisabled;  var altStyleSelected = false;  for (var i = 0; i < styleSheets.length; ++i) {    var currentStyleSheet = styleSheets[i];    if (currentStyleSheet.title) {      if (!currentStyleSheet.disabled)        altStyleSelected = true;      var lastWithSameTitle = null;      if (currentStyleSheet.title in currentStyleSheets)        lastWithSameTitle = currentStyleSheets[currentStyleSheet.title];      if (!lastWithSameTitle) {        var menuItem = document.createElement("menuitem");        menuItem.setAttribute("type", "radio");        menuItem.setAttribute("label", currentStyleSheet.title);        menuItem.setAttribute("data", currentStyleSheet.title);        menuItem.setAttribute("checked", !currentStyleSheet.disabled && !styleDisabled);        menuPopup.appendChild(menuItem);        currentStyleSheets[currentStyleSheet.title] = menuItem;      } else {        if (currentStyleSheet.disabled)          lastWithSameTitle.removeAttribute("checked");      }    }  }  menuPopup.firstChild.setAttribute("checked", styleDisabled);  itemPersistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled);  itemPersistentOnly.hidden = (window.content.document.preferredStyleSheetSet) ? true : false;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/b8e14bab11bd2cd5ef7eaaaf28ce2689079e3d20/navigator.js/clean/suite/browser/navigator.js