Changeset 204074 in webkit


Ignore:
Timestamp:
Aug 2, 2016 11:35:08 PM (8 years ago)
Author:
mmaxfield@apple.com
Message:

Update breaking rules to match ICU 57
https://bugs.webkit.org/show_bug.cgi?id=160488
<rdar://problem/25856238>

Reviewed by Darin Adler.

Source/WTF:

This patch fixes a typo in the uax14AssignmentsAfter rules which
was causing flag emoji to have line breaking opportunities in their
middles. It also fixes significant language issues for languages
such as Hebrew, and adds correct breaking opportunities around
hyphens.

  • wtf/text/TextBreakIterator.cpp:

(WTF::cursorMovementIterator):
(WTF::uax14AssignmentsAfter):
(WTF::uax14Forward):
(WTF::uax14Reverse):

LayoutTests:

  • fast/text/flag-emoji-line-break-expected.html: Added.
  • fast/text/flag-emoji-line-break.html: Added.
  • platform/mac/TestExpectations: Mark the test as failing on Yosemite.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r204063 r204074  
     12016-08-02  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Update breaking rules to match ICU 57
     4        https://bugs.webkit.org/show_bug.cgi?id=160488
     5        <rdar://problem/25856238>
     6
     7        Reviewed by Darin Adler.
     8
     9        * fast/text/flag-emoji-line-break-expected.html: Added.
     10        * fast/text/flag-emoji-line-break.html: Added.
     11        * platform/mac/TestExpectations: Mark the test as failing on Yosemite.
     12
    1132016-08-02  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/platform/mac/TestExpectations

    r204002 r204074  
    14401440webkit.org/b/159755 [ Sierra+ ] fast/text/emoji-gender-fe0f-9.html [ Pass ]
    14411441webkit.org/b/159755 [ Sierra+ ] fast/text/emoji-gender.html [ Pass ]
     1442
     1443# ADDITIONAL_EMOJI_SUPPORT is not enabled on Yosemite
     1444webkit.org/b/160488 [ Yosemite ] fast/text/flag-emoji-line-break.html [ ImageOnlyFailure ]
  • trunk/Source/WTF/ChangeLog

    r204065 r204074  
     12016-08-02  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Update breaking rules to match ICU 57
     4        https://bugs.webkit.org/show_bug.cgi?id=160488
     5        <rdar://problem/25856238>
     6
     7        Reviewed by Darin Adler.
     8
     9        This patch fixes a typo in the uax14AssignmentsAfter rules which
     10        was causing flag emoji to have line breaking opportunities in their
     11        middles. It also fixes significant language issues for languages
     12        such as Hebrew, and adds correct breaking opportunities around
     13        hyphens.
     14
     15        * wtf/text/TextBreakIterator.cpp:
     16        (WTF::cursorMovementIterator):
     17        (WTF::uax14AssignmentsAfter):
     18        (WTF::uax14Forward):
     19        (WTF::uax14Reverse):
     20
    1212016-08-02  Benjamin Poulain  <benjamin@webkit.org>
    222
  • trunk/Source/WTF/wtf/text/TextBreakIterator.cpp

    r203533 r204074  
    165165TextBreakIterator* cursorMovementIterator(StringView string)
    166166{
    167     // FIXME: These rules need to be updated for additional gender-based emoji support.
    168167#if !PLATFORM(IOS)
    169     // This rule set is based on character-break iterator rules of ICU 4.0
    170     // <http://source.icu-project.org/repos/icu/icu/tags/release-4-0/source/data/brkitr/char.txt>.
     168    // This rule set is based on character-break iterator rules of ICU 57
     169    // <http://source.icu-project.org/repos/icu/icu/tags/release-57-1/source/data/brkitr/>.
    171170    // The major differences from the original ones are listed below:
    172171    // * Replaced '[\p{Grapheme_Cluster_Break = SpacingMark}]' with '[\p{General_Category = Spacing Mark} - $Extend]' for ICU 3.8 or earlier;
     
    481480    "$PRcm = $PR $CM*;"
    482481    "$QUcm = $QU $CM*;"
    483     "$RIcm = $QU $CM*;"
     482    "$RIcm = $RI $CM*;"
    484483    "$SYcm = $SY $CM*;"
    485484    "$WJcm = $WJ $CM*;";
     
    523522    "$PR $CM+;"
    524523    "$QU $CM+;"
     524    "$RI $CM+;"
    525525    "$SY $CM+;"
    526526    "$WJ $CM+;"
     
    573573    "$BBcm $LB20NonBreaks $CM*;"
    574574    "$HLcm ($HYcm | $BAcm) [^$CB]?;"
     575    "$SYcm $HLcm;"
    575576    "($ALcm | $HLcm) $INcm;"
    576577    "$CM+ $INcm;"
     578    "$EXcm $INcm;"
    577579    "$IDcm $INcm;"
    578580    "$INcm $INcm;"
     
    681683    "[^$CB] $CM* $BB;"
    682684    "[^$CB] $CM* ($HY | $BA) $CM* $HL;"
     685    "$CM* $HL $CM* $SY;"
    683686    "$CM* $IN $CM* ($ALPlus | $HL);"
     687    "$CM* $IN $CM* $EX;"
    684688    "$CM* $IN $CM* $ID;"
    685689    "$CM* $IN $CM* $IN;"
Note: See TracChangeset for help on using the changeset viewer.