Closed Bug 1894666 Opened 10 months ago Closed 10 months ago

CSS Custom Highlight API: Call `NotifySelectionListener()` with the correct Selection type

Categories

(Core :: DOM: Selection, task)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: jjaschke, Assigned: jjaschke)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Currently, adding/removing highlight selections calls Selection::NotifySelectionListener() using nsFrameSelection::EndBatchChanges(), but for SelectionType::eNormal instead of SelectionType::eHighlight.

My assumption here is that this might trigger unnecessary a11y or IME listeners, which could be the reason for Bug 1892216. Bug 1892589 contains an abandoned wip patch to fix this, however this patch unexpectedly failed some tests, so let's continue the work for this in here.

Before this patch, the AutoFrameSelectionBatcher helper class would always call NotifySelectionListeners() for SelectionType::eNormal, even if the selection may have originated from Custom Highlight. This could have triggered unnecessary code leading to poorer performance.

Status: NEW → ASSIGNED
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e994fa43d2ab Custom Highlight API: Call `NotifySelectionListener()` for the correct selection type. r=masayuki,dom-core
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Blocks: 1892216
See Also: 1892216
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: