rem: ruleUpdaterFunc(rule); 
add: ruleUpdaterFunc(rule, ruleIndex); 
context: function updateStyleSheetForObject(aObject, aSheet) {    var selectorPrefix, name, ruleUpdaterFunc;    if (aObject.uri) {        // This is a calendar, so we're going to set the background color        name = aObject.uri.spec;        selectorPrefix = "item-calendar=";        ruleUpdaterFunc = function calendarRuleFunc(aRule) {            var color = getCalendarManager().getCalendarPref(aObject, 'color');            if (!color) {                color = "#A8C2E1";            }            aRule.style.backgroundColor = color;            aRule.style.color = getContrastingTextColor(color);        };    } else {        // This is a category, where we set the border.  Also note that we         // use the ~= selector, since there could be multiple categories        name = aObject.replace(' ','_');        selectorPrefix = "item-category~=";        ruleUpdaterFunc = function categoryRuleFunc(aRule) {            var color = getPrefSafe("calendar.category.color."+aObject, null);            if (color) {                aRule.style.border = color + " solid 2px";            }        };    }    var selector = '.calendar-item[' + selectorPrefix + '"' + name + '"]';    // Now go find our rule    var rule;    for (var i = 0; i < aSheet.cssRules.length; i++) {        var maybeRule = aSheet.cssRules[i];        if (maybeRule.selectorText && (maybeRule.selectorText == selector)) {            rule = maybeRule;            break;        }    }    if (!rule) {        aSheet.insertRule(selector + ' { }', aSheet.cssRules.length);        rule = aSheet.cssRules[aSheet.cssRules.length-1];    }    ruleUpdaterFunc(rule);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/8a914b916c0c801e139eda048962f8c1e4514b5d/calendar-views.js/clean/calendar/base/content/calendar-views.js