Closed Bug 1838377 Opened 10 months ago Closed 10 months ago

StyleEditor rule count doesn't account for nested rules

Categories

(DevTools :: Style Editor, defect)

defect

Tracking

(firefox116 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

The rule count we show in the style editor (under the stylesheet name) is simply StyleSheet.cssRules.length, which only return the number of top-level rules.
If we want to count nested rules, we need to traverse all the descendant rules as well

(this is already visible with at-rules, and may be even more noticeable once css nesting is enabled)

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/89586dccb277
[devtools] Include nested rules in stylesheet ruleCount. r=devtools-reviewers,jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Regressions: 1839168
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: