rem: AddRulesToTreechildren(subtreeitem, rules[j].cssRules, external, depth+1, (insertIndex == -1) ? insertIndex : insertIndex+1 ); 
add: AddRulesToTreechildren(subtreeitem, rules[j].cssRules, external, depth+1); 
context: function AddRulesToTreechildren(treeItem, rules, external, depth){  // is there any rule in the stylesheet ; earlay way out if not  if (rules && rules.length) {    var subtreechildren = document.createElementNS(XUL_NS, "treechildren");    var j, o;    var subtreeitem, subtreerow, subtreecell;    // let's browse all the rules    for (j=0; j< rules.length; j++) {      switch (rules[j].type) {        case CSSRule.STYLE_RULE:          // this is a CSSStyleRule          subtreeitem  = AddStyleRuleToTreeChildren(rules[j], external, depth);          subtreechildren.appendChild(subtreeitem);          break;        case CSSRule.IMPORT_RULE:          // this is CSSImportRule for @import          subtreeitem  = AddImportRuleToTreeChildren(rules[j], external, depth);          subtreechildren.appendChild(subtreeitem);          break;        case CSSRule.MEDIA_RULE:          // this is a CSSMediaRule @media          subtreeitem  = document.createElementNS(XUL_NS, "treeitem");          subtreerow   = document.createElementNS(XUL_NS, "treerow");          subtreecell  = document.createElementNS(XUL_NS, "treecell");          // show "@media" and media list          subtreecell.setAttribute("label", "@media "+rules[j].media.mediaText, external);          o = newObject( subtreeitem, external, MEDIA_RULE, rules[j], false, depth );          PushInObjectsArray(o, insertIndex);          if (external) {            subtreecell.setAttribute("properties", "external");          }          subtreerow.appendChild(subtreecell);          subtreeitem.appendChild(subtreerow);          subtreeitem.setAttribute("container", "true");          // let's browse the rules attached to this CSSMediaRule, keeping the          // current external and increasing depth          AddRulesToTreechildren(subtreeitem, rules[j].cssRules, external, depth+1,                                 (insertIndex == -1) ? insertIndex : insertIndex+1 );          subtreechildren.appendChild(subtreeitem);          break;        case CSSRule.CHARSET_RULE:          // this is a CSSCharsetRule          subtreeitem  = document.createElementNS(XUL_NS, "treeitem");          subtreerow   = document.createElementNS(XUL_NS, "treerow");          subtreecell  = document.createElementNS(XUL_NS, "treecell");          // show "@charset" and the encoding          subtreecell.setAttribute("label", "@charset "+rules[j].encoding, external);          o = newObject( subtreeitem, external, CHARSET_RULE, rules[j], false, depth );          PushInObjectsArray(o, insertIndex);          if (external) {            subtreecell.setAttribute("properties", "external");          }          subtreerow.appendChild(subtreecell);          subtreeitem.appendChild(subtreerow);          subtreechildren.appendChild(subtreeitem);          break;                }    }    treeItem.appendChild(subtreechildren);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f30d3ed334b276b661545ac9df74bc483ba398fa/EdCssProps.js/clean/extensions/editor/cascades/resources/content/EdCssProps.js