Closed Bug 1425480 Opened 6 years ago Closed 6 years ago

Moving selection by word may break surrogate pairs

Categories

(Core :: DOM: Selection, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(3 files)

User selection/editing actions should never break up surrogate pairs. Usually, we handle this OK (e.g. see fixes in bug 237585, bug 1068979), but the attachment shows a testcase where we still get it wrong.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
This includes a couple of examples that fail on current trunk, due to the bug here.
Attachment #8937265 - Flags: review?(m_kato)
Attachment #8937264 - Flags: review?(m_kato) → review+
Attachment #8937265 - Flags: review?(m_kato) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e86819740d04
Don't let nsTextFrame's ClusterIterator return an offset in the middle of a surrogate pair from GetAfterOffset()/GetBeforeOffset(). r=m_kato
https://hg.mozilla.org/integration/mozilla-inbound/rev/3126f89e3541
Add word-movement testcases that include supplementary-plane (surrogate pair) characters. r=m_kato
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/e86819740d04
https://hg.mozilla.org/mozilla-central/rev/3126f89e3541
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: