inIDOMUtils.getCSSStyleRules should not repeatedly use insertElementAt(0) to produce a reversed array

RESOLVED FIXED in Firefox 52

Status

defect
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: heycam, Assigned: heycam)

Tracking

unspecified
Firefox 52
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

We should do something better than repeatedly inserting an element at index 0 to build up the array of rules in inIDOMUtils.getCSSStyleRules.
Posted patch patchSplinter Review
Noticed this when reviewing bug 1311191.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #8803810 - Flags: review?(erahm)
Depends on: 1311191
Attachment #8803810 - Attachment is patch: true
Attachment #8803810 - Flags: review?(erahm) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8394f9b7b9e5
Build up list of applicable rules in reverse to avoid quadratic time array manipulations. r=erahm
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8394f9b7b9e5
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.