New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 594923 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Too many cursor movement positions for emoji sequences

Project Member Reported by drott@chromium.org, Mar 15 2016

Issue description

In a contenteditable element with emoji sequences, using cursor keys to skip over emoji sequences, it takes as many cursor key presses as the emoji sequences has forming characters (without counting the ZWJ). I.e. a family emoji joiner sequence consisting of four family members takes 4 cursor keys until you can navigate to the next character.

Potential duplicate of  issue 594920  but filing as separate in case it's not.
 
emoji-edit.html
3.6 KB View Download

Comment 1 by drott@chromium.org, Mar 15 2016

Just to clarify: I consider the expected behavior to skip over emoji joiner sequences as one cursor keypress - it does already work that way for the DIGIT + ENCLOSING KEYCAP sequences.

Comment 2 by nona@chromium.org, Mar 16 2016

Cc: yosin@chromium.org
Owner: nona@chromium.org
I'm going to take a look.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886

commit 5caf6fd59d6f35157a3e6ba4728434ac3d1b0886
Author: nona <nona@chromium.org>
Date: Fri Mar 25 09:26:43 2016

Move LayoutObject::nextOffset/previousOffset() to editing utility

This is preparation of introducing our own grapheme cluster boundary
breaker to the Blink. To prevent regressions, added unit tests for
known rules.

There are few differences from original Unicode grapheme cluster
boundary spec.
- Break even after Prepend class character.
- Break after Tamil virama sign.

The cursorMovementIterator function also addresses following things
but not necessary for latest Unicode spec.
- Extend class is excluded from SpacingMark.
- Japanese half-width katakana voiced marks has Extend property.

BUG= 594923 

Review URL: https://codereview.chromium.org/1833653002

Cr-Commit-Position: refs/heads/master@{#383265}

[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/editing/EditingTestBase.cpp
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/editing/EditingTestBase.h
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/5caf6fd59d6f35157a3e6ba4728434ac3d1b0886/third_party/WebKit/Source/core/layout/api/LineLayoutItem.h

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/376ec7f5a84c0e2f03f813310450c375991f8591

commit 376ec7f5a84c0e2f03f813310450c375991f8591
Author: nona <nona@chromium.org>
Date: Mon Apr 04 06:02:34 2016

Introduce IsGraphemeBreak function.

Followings are differences from the previous grapheme breaker:
- Follows latest(including proposed) grapheme breaker spec:
  Unicode Standard Annex #29 http://www.unicode.org/reports/tr29

- Removed Tamil exception rule from Indic syllable composition.
  Introduced by https://bugs.webkit.org/show_bug.cgi?id=15790
  Neither bug nor change description doesn't mention about Tamil
  exception but latest Unicode standards doesn't have exception.

- Revive Rule GB9b rule: don't break after Prepend property.
  Introduced by https://bugs.webkit.org/show_bug.cgi?id=24342
  It is safe to revive this rule since Thai characters no longer have
  Prepend property since Unicode 6.1.
  Note that there are no character having Prepend property until
  Unicode 9.0 after Unicode 6.1

IsGraphemeBreak function is compiled and tested but not used on
production. This function is used by subsequent CLs.

BUG= 594923 

Review URL: https://codereview.chromium.org/1856603002

Cr-Commit-Position: refs/heads/master@{#384852}

[modify] https://crrev.com/376ec7f5a84c0e2f03f813310450c375991f8591/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/376ec7f5a84c0e2f03f813310450c375991f8591/third_party/WebKit/Source/core/editing/state_machines/StateMachineUtil.cpp
[add] https://crrev.com/376ec7f5a84c0e2f03f813310450c375991f8591/third_party/WebKit/Source/core/editing/state_machines/StateMachineUtil.h
[add] https://crrev.com/376ec7f5a84c0e2f03f813310450c375991f8591/third_party/WebKit/Source/core/editing/state_machines/StateMachineUtilTest.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 6 2016

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 6 2016

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7e8a5d82b32386818839d8f874395f37eb3184bf

commit 7e8a5d82b32386818839d8f874395f37eb3184bf
Author: nona <nona@chromium.org>
Date: Thu Apr 07 06:25:31 2016

Introduce ForwardGraphemeBoundaryStateMachine

ForwardGraphemeBoundaryStateMachine provides a way to obtain
the following grapheme boundary.

ForwardGraphemeBoundaryStateMachine is compiled and tested
but not yet used in production with this CL.
Subsequent CL will use this class.

BUG= 594923 

Review URL: https://codereview.chromium.org/1857633002

Cr-Commit-Position: refs/heads/master@{#385678}

[modify] https://crrev.com/7e8a5d82b32386818839d8f874395f37eb3184bf/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/7e8a5d82b32386818839d8f874395f37eb3184bf/third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachine.cpp
[add] https://crrev.com/7e8a5d82b32386818839d8f874395f37eb3184bf/third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachine.h
[add] https://crrev.com/7e8a5d82b32386818839d8f874395f37eb3184bf/third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachineTest.cpp
[modify] https://crrev.com/7e8a5d82b32386818839d8f874395f37eb3184bf/third_party/WebKit/Source/core/editing/state_machines/StateMachineTestUtil.cpp
[modify] https://crrev.com/7e8a5d82b32386818839d8f874395f37eb3184bf/third_party/WebKit/Source/core/editing/state_machines/StateMachineTestUtil.h

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3d284a415f093a8e0ddbdd955f9f3ee5e11c2a57

commit 3d284a415f093a8e0ddbdd955f9f3ee5e11c2a57
Author: nona <nona@chromium.org>
Date: Thu Apr 07 12:16:48 2016

Use our own grapheme boundary handling

This CL replaces the grapheme boundary detection
from ICU's implementation to our own.

By replacing with own implementation, we can support
latest Unicode spec without waiting ICU update.
For example, grapheme boundary for the recent complex
emoji sequence is now supported.

There is another benefit of new implementation. The
interface of new implementation does not require the
full continuous text buffer. This is good if the target
text crosses the Nodes.

BUG= 594923 

Review URL: https://codereview.chromium.org/1853033002

Cr-Commit-Position: refs/heads/master@{#385720}

[modify] https://crrev.com/3d284a415f093a8e0ddbdd955f9f3ee5e11c2a57/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/3d284a415f093a8e0ddbdd955f9f3ee5e11c2a57/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp

Comment 10 by nona@chromium.org, Apr 7 2016

Status: Fixed (was: Assigned)
I believe this should be fixed now.
Please file an another issue if you find any individual issues.

Thank you.
Nice! Thanks!
Project Member

Comment 14 by bugdroid1@chromium.org, Apr 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d54a5cbde82b8238e55fcd1450c0d838acd9fab9

commit d54a5cbde82b8238e55fcd1450c0d838acd9fab9
Author: nona <nona@chromium.org>
Date: Wed Apr 20 09:40:48 2016

Do not break after ZWJ if the trailing character is Emoji.

Vendor may want to introduce their own ZWJ sequence.
To handle any kind of ZWJ joiner sequence, do not break the
grapheme cluster after ZWJ. Similary, need to delete emoji
before and after ZWJ at the same time by single backspace key.

BUG= 594923 
BUG= 594920 

Review URL: https://codereview.chromium.org/1902553004

Cr-Commit-Position: refs/heads/master@{#388455}

[modify] https://crrev.com/d54a5cbde82b8238e55fcd1450c0d838acd9fab9/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
[modify] https://crrev.com/d54a5cbde82b8238e55fcd1450c0d838acd9fab9/third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachine.cpp
[modify] https://crrev.com/d54a5cbde82b8238e55fcd1450c0d838acd9fab9/third_party/WebKit/Source/core/editing/state_machines/BackspaceStateMachineTest.cpp
[modify] https://crrev.com/d54a5cbde82b8238e55fcd1450c0d838acd9fab9/third_party/WebKit/Source/core/editing/state_machines/StateMachineUtil.cpp
[modify] https://crrev.com/d54a5cbde82b8238e55fcd1450c0d838acd9fab9/third_party/WebKit/Source/core/editing/state_machines/StateMachineUtilTest.cpp
[modify] https://crrev.com/d54a5cbde82b8238e55fcd1450c0d838acd9fab9/third_party/WebKit/Source/platform/text/Character.h
[modify] https://crrev.com/d54a5cbde82b8238e55fcd1450c0d838acd9fab9/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp

Sign in to add a comment