(rule: CSSStyleRule)
| 47 | let renderId = 0; |
| 48 | |
| 49 | function getStyleRuleHash(rule: CSSStyleRule) { |
| 50 | let cssText = rule.cssText; |
| 51 | if (isMediaRule(rule.parentRule)) { |
| 52 | cssText = `${rule.parentRule.media.mediaText} { ${cssText} }`; |
| 53 | } |
| 54 | if (isLayerRule(rule.parentRule)) { |
| 55 | cssText = `${rule.parentRule.name} { ${cssText} }`; |
| 56 | } |
| 57 | return getHashCode(cssText); |
| 58 | } |
| 59 | |
| 60 | const rulesTextCache = new Set<number>(); |
| 61 | const rulesModCache = new Map<number, ModifiableCSSRule>(); |
no test coverage detected