Closed Bug 1312331 Opened 8 years ago Closed 8 years ago

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

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox52 fixed)

RESOLVED FIXED
Firefox 52
Tracking Status
firefox52 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(1 file)

We should do something better than repeatedly inserting an element at index 0 to build up the array of rules in inIDOMUtils.getCSSStyleRules.
Attached 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: 8 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.

Attachment

General

Created:
Updated:
Size: