Lines Matching defs:rule

626 this.isImageRule=function(rule){if(!imageRules){imageRules=[];
630 }}}return imageRules.indexOf?imageRules.indexOf(rule.toLowerCase())!=-1:(" "+imageRules.join(" ")+" ").indexOf(" "+rule.toLowerCase()+" ")!=-1
6725 CssParser=(function(){function rule(start,body_start,end){return{start:start||0,body_start:body_start||0,end:end||0,line:-1,selector:null,parent:null,children:[],addChild:function(start,body_start,end){var r=rule(start,body_start,end);
6768 }return{read:function(text,startLine){var rule_start=[],rule_body_start=[],rules=[],in_comment=0,root=rule(),cur_parent=root,last_rule=null,stack=[],ch,ch2;
6869 j++){try{var rule=rules[j];
6870 importedStyleSheet=rule.styleSheet;
6895 var rule=rules[i];
6896 var selector=rule.selectorText||"";
6909 }}}CSSRuleMap[rid]={styleSheetId:ssid,styleSheetIndex:i,order:++globalCSSRuleIndex,specificity:selector&&selector.indexOf(",")==-1?getCSSRuleSpecificity(selector):0,rule:rule,lineNo:lineNo,selector:selector,cssText:rule.style?rule.style.cssText:rule.cssText?rule.cssText:""};
6956 var ruleId,rule;
6960 rule=CSSRuleMap[ruleId];
6961 if(rule.selector.indexOf(",")!=-1){var selectors=rule.selector.split(",");
6970 }}}rule.specificity=maxSpecificity
7045 this.getRuleMatchingElements=function(rule,doc){var css=rule.selectorText;
7064 var CSSDomplateBase={isEditable:function(rule){return !rule.isSystemSheet
7065 },isSelectorEditable:function(rule){return rule.isSelectorEditable&&this.isEditable(rule)
7067 var CSSPropTag=domplate(CSSDomplateBase,{tag:DIV({"class":"cssProp focusRow",$disabledStyle:"$prop.disabled",$editGroup:"$rule|isEditable",$cssOverridden:"$prop.overridden",role:"option"},A({"class":"cssPropDisable"},"  "),SPAN({"class":"cssPropName",$editable:"$rule|isEditable"},"$prop.name"),SPAN({"class":"cssColon"},":"),SPAN({"class":"cssPropValue",$editable:"$rule|isEditable"},"$prop.value$prop.important"),SPAN({"class":"cssSemi"},";"))});
7068 var CSSRuleTag=TAG("$rule.tag",{rule:"$rule"});
7069 var CSSImportRuleTag=domplate({tag:DIV({"class":"cssRule insertInto focusRow importRule",_repObject:"$rule.rule"},"@import "",A({"class":"objectLink",_repObject:"$rule.rule.styleSheet"},"$rule.rule.href"),"";")});
7070 var CSSStyleRuleTag=domplate(CSSDomplateBase,{tag:DIV({"class":"cssRule insertInto",$cssEditableRule:"$rule|isEditable",$editGroup:"$rule|isSelectorEditable",_repObject:"$rule.rule",ruleId:"$rule.id",role:"presentation"},DIV({"class":"cssHead focusRow",role:"listitem"},SPAN({"class":"cssSelector",$editable:"$rule|isSelectorEditable"},"$rule.selector")," {"),DIV({role:"group"},DIV({"class":"cssPropertyListBox",role:"listbox"},FOR("prop","$rule.props",TAG(CSSPropTag.tag,{rule:"$rule",prop:"$prop"})))),DIV({"class":"editable insertBefore",role:"presentation"},"}"))});
7098 },setProperty:function(rule,propName,propValue,propPriority){var style=rule.style||rule;
7105 }if(propName){dispatch(this.fbListeners,"onCSSSetProperty",[style,propName,propValue,propPriority,prevValue,prevPriority,rule,baseText])
7106 }},removeProperty:function(rule,propName,parent){var style=rule.style||rule;
7112 }if(propName){dispatch(this.fbListeners,"onCSSRemoveProperty",[style,propName,prevValue,prevPriority,rule,baseText])
7115 Firebug.CSSStyleSheetPanel.prototype=extend(Firebug.SourceBoxPanel,{template:domplate({tag:DIV({"class":"cssSheet insertInto a11yCSSView"},FOR("rule","$rules",CSSRuleTag),DIV({"class":"cssSheet editable insertBefore"},""))}),refresh:function(){if(this.location){this.updateLocation(this.location)
7124 }},getStylesheetURL:function(rule){if(this.location.href){return this.location.href
7130 ++i){var rule=cssRules[i];
7131 if(rule instanceof CSSStyleRule){var ruleLine=domUtils.getRuleLine(rule);
7132 if(ruleLine>=line){return rule
7133 }}}},highlightRule:function(rule){var ruleElement=Firebug.getElementByRepObject(this.panelNode.firstChild,rule);
7139 ++i){var rule=cssRules[i];
7140 if(instanceOf(rule,"CSSStyleRule")){var props=this.getRuleProperties(context,rule);
7142 var selector=rule.selectorText;
7145 }var ruleId=rule.selectorText+"/"+line;
7146 rules.push({tag:CSSStyleRuleTag.tag,rule:rule,id:ruleId,selector:selector,props:props,isSystemSheet:isSystemSheet,isSelectorEditable:true})
7147 }else{if(instanceOf(rule,"CSSImportRule")){rules.push({tag:CSSImportRuleTag.tag,rule:rule})
7148 }else{if(instanceOf(rule,"CSSMediaRule")){appendRules.apply(this,[rule.cssRules])
7149 }else{if(FBTrace.DBG_ERRORS||FBTrace.DBG_CSS){FBTrace.sysout("css getStyleSheetRules failed to classify a rule ",rule)
7165 },getRuleProperties:function(context,rule,inheritMode){var props=this.parseCSSProps(rule.style,inheritMode);
7167 var ruleId=rule.selectorText+"/"+line;
7195 if(!styleRuleBox){var rule={rule:this.selection,inherited:false,selector:"element.style",props:[]};
7196 if(!rulesBox){styleRuleBox=this.template.cascadedTag.replace({rules:[rule],inherited:[],inheritLabel:"Inherited from"},this.panelNode);
7198 }else{styleRuleBox=this.template.ruleTag.insertBefore({rule:rule},rulesBox)
7208 },deletePropertyRow:function(row){var rule=Firebug.getRepObject(row);
7210 Firebug.CSSModule.removeProperty(rule,propName);
7221 var rule=Firebug.getRepObject(row);
7229 if(hasClass(row,"disabledStyle")){Firebug.CSSModule.removeProperty(rule,propName);
7231 }else{Firebug.CSSModule.setProperty(rule,propName,parsedValue.value,parsedValue.priority);
7351 if(propNameNode&&isImageRule(propNameNode[textContent])){var rule=Firebug.getRepObject(target);
7352 var baseURL=this.getStylesheetURL(rule);
7406 function CSSElementPanel(){}CSSElementPanel.prototype=extend(Firebug.CSSStyleSheetPanel.prototype,{template:domplate({cascadedTag:DIV({"class":"a11yCSSView",role:"presentation"},DIV({role:"list","aria-label":$STR("aria.labels.style rules")},FOR("rule","$rules",TAG("$ruleTag",{rule:"$rule"}))),DIV({role:"list","aria-label":$STR("aria.labels.inherited style rules")},FOR("section","$inherited",H1({"class":"cssInheritHeader groupHeader focusRow",role:"listitem"},SPAN({"class":"cssInheritLabel"},"$inheritLabel"),TAG(FirebugReps.Element.shortTag,{object:"$section.element"})),DIV({role:"group"},FOR("rule","$section.rules",TAG("$ruleTag",{rule:"$rule"})))))),ruleTag:isIE?DIV({"class":"cssElementRuleContainer"},TAG(FirebugReps.SourceLink.tag,{object:"$rule.sourceLink"}),TAG(CSSStyleRuleTag.tag,{rule:"$rule"})):DIV({"class":"cssElementRuleContainer"},TAG(CSSStyleRuleTag.tag,{rule:"$rule"}),TAG(FirebugReps.SourceLink.tag,{object:"$rule.sourceLink"}))}),updateCascadeView:function(element){var rules=[],sections=[],usedProps={};
7413 }},getStylesheetURL:function(rule){if(rule&&rule.parentStyleSheet&&rule.parentStyleSheet.href){return rule.parentStyleSheet.href
7426 var rule=ruleData.rule;
7434 }var props=this.getRuleProperties(this.context,rule,inheritMode);
7437 var ruleId=rule.selectorText+"/"+line;
7438 var sourceLink=new SourceLink(href,line,"css",rule,instance);
7440 rules.splice(0,0,{rule:rule,id:ruleId,selector:ruleData.selector,sourceLink:sourceLink,props:props,inherited:inheritMode,isSystemSheet:isSystemSheet})
7459 if(props.length){rules.splice(0,0,{rule:element,id:getElementXPath(element),selector:"element.style",props:props,inherited:inheritMode})
7515 }CSSEditor.prototype=domplate(Firebug.InlineEditor.prototype,{insertNewRow:function(target,insertWhere){var rule=Firebug.getRepObject(target);
7517 if(insertWhere=="before"){return CSSPropTag.tag.insertBefore({prop:emptyProp,rule:rule},target)
7518 }else{return CSSPropTag.tag.insertAfter({prop:emptyProp,rule:rule},target)
7523 }var rule=Firebug.getRepObject(target);
7527 }if(previousValue){Firebug.CSSModule.removeProperty(rule,previousValue)
7528 }Firebug.CSSModule.setProperty(rule,value,parsedValue.value,parsedValue.priority)
7529 }}else{if(!value){Firebug.CSSModule.removeProperty(rule,previousValue)
7534 Firebug.CSSModule.setProperty(rule,propName,parsedValue.value,parsedValue.priority)
7535 }else{if(previousValue&&previousValue!="null"){Firebug.CSSModule.removeProperty(rule,propName)
7549 if(insertWhere=="before"){return CSSStyleRuleTag.tag.insertBefore({rule:emptyRule},target)
7550 }else{return CSSStyleRuleTag.tag.insertAfter({rule:emptyRule},target)
7558 var rule=Firebug.getRepObject(target),oldRule=rule;
7560 if(rule||Firebug.getRepObject(row.nextSibling)){var searchRule=rule||Firebug.getRepObject(row.nextSibling);
7576 rule=cssRules[insertLoc];
7582 }}else{rule=undefined
7583 }row.repObject=rule;
7650 child=child.nextSibling){if(child.offsetTop+child.offsetHeight>panelNode.scrollTop){var rule=child.repObject;
7651 if(rule){return{line:domUtils.getRuleLine(rule),offset:panelNode.scrollTop-child.offsetTop}