rem: } 
add: } 
context: function initFontSizeMenu(menuPopup){  if (menuPopup)  {    var children = menuPopup.childNodes;    if (!children) return;    var firstHas = { value: false };    var anyHas = { value: false };    var allHas = { value: false };    var sizeWasFound = false;    // we need to set or clear the checkmark for each menu item since the selection    // may be in a new location from where it was when the menu was previously opened    // First 2 items add <small> and <big> tags    // While it would be better to show the number of levels,    //  at least this tells user if either of them are set    var menuItem = children[0];    if (menuItem)    {      EditorGetTextProperty("small", "", "", firstHas, anyHas, allHas);      menuItem.setAttribute("checked", allHas.value);      sizeWasFound = anyHas.value;    }    menuItem = children[1];    if (menuItem)    {      EditorGetTextProperty("big", "", "", firstHas, anyHas, allHas);      menuItem.setAttribute("checked", allHas.value);      sizeWasFound |= anyHas.value;    }    // Fixed size items start after menu separator    var menuIndex = 3;    // Index of the medium (default) item    var mediumIndex = 5;    // Scan through all supported "font size" attribute values    for (var i = -2; i <= 3; i++)    {      menuItem = children[menuIndex];      // Skip over medium since it'll be set below.      // If font size=0 is actually set, we'll toggle it off below if      // we enter this loop in this case.      if (menuItem && (i != 0))      {        var sizeString = (i <= 0) ? String(i) : ("+" + String(i));        EditorGetTextProperty("font", "size", sizeString, firstHas, anyHas, allHas);        // Check the item only if all of selection has the size...        menuItem.setAttribute("checked", allHas.value);        // ...but remember if ANY of of selection had size set        sizeWasFound |= anyHas.value;      }      menuIndex++;    }    // if no size was found, then check default (medium)    // note that no item is checked in the case of "mixed" selection    children[mediumIndex].setAttribute("checked", !sizeWasFound);  } }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/13a42d51d1951b151f22aafab2b214ada74309ac/editor.js/buggy/editor/ui/composer/content/editor.js