rem: var unitsArray = [ "px", "%", "pt", "cm", "in", "mm", "pc", "em", "ex" ]; var j, newitem; for (j=0; j<unitsArray.length; j++) { 
add: var unitsArray = [ "%", "px", "pt", "cm", "in", "mm", "pc", "em", "ex" ]; var j, newitem, start = 0; if (!allowsPercentages) start = 1; for (j=start; j<unitsArray.length; j++) { 
context: function InitLengthUnitMenuPopup(elt, property, id){  var value = elt.parentNode.value;  var re = /([+-]?\d*\.\d+|[+-]?\d+)\D*/ ;  var found = value.match(re);  var numPart = "0";  if (found && found.length != 0)    numPart = RegExp.$1;  var child = elt.firstChild, tmp;  while (child && child.nodeName.toLowerCase() != "menuseparator") {    tmp = child.nextSibling;    elt.removeChild(child);    child = tmp;  }  // below is an array of all valid CSS length units  var unitsArray = [ "px", "%", "pt", "cm", "in", "mm", "pc", "em", "ex" ];  var j, newitem;  for (j=0; j<unitsArray.length; j++) {    var itemValue = numPart + unitsArray[j];    newitem = document.createElementNS(XUL_NS, "menuitem");    newitem.setAttribute("label", itemValue);    if (id)      newitem.setAttribute("oncommand", "onPullDownChanged(" +                                        "'" + property + "'" +                                        ", " +                                        "'" + itemValue + "'" +                                        ", " +                                        "'" + id + "'"                                        +");");    else      newitem.setAttribute("oncommand", "onPullDownChanged(" +                                        "'" + property + "'" +                                        ", " +                                        "'" + itemValue + "'" +                                        ", " +                                        "null"                                        +");");    if (child)      elt.insertBefore(newitem, child);    else      elt.appendChild(newitem);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/340ad084bbbd70bba8a580612b0c9969ad757723/commonCssProps.js/buggy/extensions/editor/cascades/resources/content/commonCssProps.js