sheet.cssRules is a CSSRuleList, which is essentially an array of CSSRule objects. selectorText is on CSSStyleRule, which is a subclass of CSSRule. So the frontend code here is buggy. Worse, though, it's really bad form for any code in the Firefox frontend to be poking at the object model of style sheets; it defeats sharing optimizations and forces each window to have a separate copy of all the data in that style sheet.
Component: Style System (CSS) → Tabbed Browser
Product: Core → Firefox
I filed bug 851870 on warning about that.
The good news is that this is new code in 21.
I'm fixing this in bug 851436 by backing all the relevant stuff out: the patches for bug 837486, bug 649654, and bug 821859 in that order. When that lands, I will close this as [fixed-in-bug-851436].
Assignee: nobody → fyan
Status: NEW → ASSIGNED
Depends on: 851436
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.