New issue
Advanced search Search tips

Issue 593263 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Emoji sequence may be split in the middle by line breaking

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

Issue description

Emoji ZWJ sequences like 
U+1F468 U+200D U+1F469 U+200D U+1F467 U+200D U+1F466
Family: man, woman, girl, boy

may get split in the middle if they are placed at the end of a line and our line breaking code attempts to calculate where this emoji should be placed.

This is the result of ICU's line break iterator suggesting break positions in the middle of these sequences.

For now, we should customize the line breaking behaviour to avoid that, until  issue 593260  is fixed.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 11 2016

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

commit 950933340685436d8d1d7b8f9d7767e95bcf96a6
Author: drott <drott@chromium.org>
Date: Fri Mar 11 13:34:51 2016

Fix emoji ZWJ and modifier sequence line breaking

Line breaking positions returned from ICU would allow us to break emoji
sequences in the middle, leading to part of the sequence being shown as the
fallback emoji on the first line, the other part on the second
line. Until ICU implements this behavior we customize the line breaking
and reject those break suggestions.

Original isBreakValid implementation by Raph Levien, adapted to Blink
with permission, thank you!

BUG= 593263 
TEST=TextBreakIterator* unit tests in blink_platform_unittests

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

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

[modify] https://crrev.com/950933340685436d8d1d7b8f9d7767e95bcf96a6/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/950933340685436d8d1d7b8f9d7767e95bcf96a6/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
[add] https://crrev.com/950933340685436d8d1d7b8f9d7767e95bcf96a6/third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp

Comment 2 by drott@chromium.org, Mar 11 2016

Status: Fixed (was: Started)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 8 2016

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

commit 62d66e352097e36b6f7846b68f9e0b05eb9598ad
Author: jshin <jshin@chromium.org>
Date: Tue Nov 08 19:55:18 2016

Remove isBreakValid for Emoji sequences

isBreakValid was added to avoid wrap lines in the middle of an Emoji
sequence (ZWJ-linked or Emoji base + Emoji modifier), but it's not
necessary any more now that ICU was updated to 58.1 that handles
Emoji sequences correctly.

BUG= 593263 
TEST=blink_platform_unittest --gtest_filter=*BreakItera*

Review-Url: https://codereview.chromium.org/2478383003
Cr-Commit-Position: refs/heads/master@{#430691}

[modify] https://crrev.com/62d66e352097e36b6f7846b68f9e0b05eb9598ad/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
[modify] https://crrev.com/62d66e352097e36b6f7846b68f9e0b05eb9598ad/third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp

Sign in to add a comment