Closed Bug 1836013 Opened 2 years ago Closed 2 years ago

Custom Highlight API: Order Highlights by insertion order

Categories

(Core :: DOM: Selection, task)

task

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: jjaschke, Assigned: jjaschke)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Custom Highlights need to be sorted by insertion order. Therefore, nsTHashMap<> is not the right data structure and should be replaced with something like nsTArray<CompactPair<>> which provides a somewhat similar interface, even though the lookup performance may decrease slightly (O(n) vs O(1)). If this shows up in profiling, a different approach would be necessary, but for now this should be okay.

This patch used to be part 1 of Bug 1811823. However due to some still unresolved issues with part 2 of that patch, part 1 is extracted into this bug in order to land it sooner.

Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33fdbcbefecd Order highlight selections by insertion order. r=masayuki
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: