Title: [204074] trunk
Revision
204074
Author
mmaxfi...@apple.com
Date
2016-08-02 23:35:08 -0700 (Tue, 02 Aug 2016)

Log 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.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (204073 => 204074)


--- trunk/LayoutTests/ChangeLog	2016-08-03 06:16:15 UTC (rev 204073)
+++ trunk/LayoutTests/ChangeLog	2016-08-03 06:35:08 UTC (rev 204074)
@@ -1,3 +1,15 @@
+2016-08-02  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Update breaking rules to match ICU 57
+        https://bugs.webkit.org/show_bug.cgi?id=160488
+        <rdar://problem/25856238>
+
+        Reviewed by Darin Adler.
+
+        * 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.
+
 2016-08-02  Chris Dumez  <cdu...@apple.com>
 
         Drop custom bindings code for HTMLOptionsCollection.remove()

Added: trunk/LayoutTests/fast/text/flag-emoji-line-break-expected.html (0 => 204074)


--- trunk/LayoutTests/fast/text/flag-emoji-line-break-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/flag-emoji-line-break-expected.html	2016-08-03 06:35:08 UTC (rev 204074)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that a line break cannot occur in the middle of a flag emoji.
+<div style="font: 100px 'Apple Color Emoji'; -webkit-line-break: normal; width: 750px;">&#x1f567;&#x1f1e6;&#x1f1eb;&#x1f1fa;&#x1f1f8;</div>
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/fast/text/flag-emoji-line-break.html (0 => 204074)


--- trunk/LayoutTests/fast/text/flag-emoji-line-break.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/flag-emoji-line-break.html	2016-08-03 06:35:08 UTC (rev 204074)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that a line break cannot occur in the middle of a flag emoji.
+<div style="font: 100px 'Apple Color Emoji'; -webkit-line-break: normal; width: 400px;">&#x1f567;&#x1f1e6;&#x1f1eb;&#x1f1fa;&#x1f1f8;</div>
+</body>
+</html>
\ No newline at end of file

Modified: trunk/LayoutTests/platform/mac/TestExpectations (204073 => 204074)


--- trunk/LayoutTests/platform/mac/TestExpectations	2016-08-03 06:16:15 UTC (rev 204073)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-08-03 06:35:08 UTC (rev 204074)
@@ -1439,3 +1439,6 @@
 webkit.org/b/159755 [ Sierra+ ] fast/text/emoji-gender-fe0f-8.html [ Pass ]
 webkit.org/b/159755 [ Sierra+ ] fast/text/emoji-gender-fe0f-9.html [ Pass ]
 webkit.org/b/159755 [ Sierra+ ] fast/text/emoji-gender.html [ Pass ]
+
+# ADDITIONAL_EMOJI_SUPPORT is not enabled on Yosemite
+webkit.org/b/160488 [ Yosemite ] fast/text/flag-emoji-line-break.html [ ImageOnlyFailure ]

Modified: trunk/Source/WTF/ChangeLog (204073 => 204074)


--- trunk/Source/WTF/ChangeLog	2016-08-03 06:16:15 UTC (rev 204073)
+++ trunk/Source/WTF/ChangeLog	2016-08-03 06:35:08 UTC (rev 204074)
@@ -1,3 +1,23 @@
+2016-08-02  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Update breaking rules to match ICU 57
+        https://bugs.webkit.org/show_bug.cgi?id=160488
+        <rdar://problem/25856238>
+
+        Reviewed by Darin Adler.
+
+        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):
+
 2016-08-02  Benjamin Poulain  <benja...@webkit.org>
 
         [JSC] Simplify the initialization of AbstractValue in the AbstractInterpreter

Modified: trunk/Source/WTF/wtf/text/TextBreakIterator.cpp (204073 => 204074)


--- trunk/Source/WTF/wtf/text/TextBreakIterator.cpp	2016-08-03 06:16:15 UTC (rev 204073)
+++ trunk/Source/WTF/wtf/text/TextBreakIterator.cpp	2016-08-03 06:35:08 UTC (rev 204074)
@@ -164,10 +164,9 @@
 
 TextBreakIterator* cursorMovementIterator(StringView string)
 {
-    // FIXME: These rules need to be updated for additional gender-based emoji support.
 #if !PLATFORM(IOS)
-    // This rule set is based on character-break iterator rules of ICU 4.0
-    // <http://source.icu-project.org/repos/icu/icu/tags/release-4-0/source/data/brkitr/char.txt>.
+    // This rule set is based on character-break iterator rules of ICU 57
+    // <http://source.icu-project.org/repos/icu/icu/tags/release-57-1/source/data/brkitr/>.
     // The major differences from the original ones are listed below:
     // * Replaced '[\p{Grapheme_Cluster_Break = SpacingMark}]' with '[\p{General_Category = Spacing Mark} - $Extend]' for ICU 3.8 or earlier;
     // * Removed rules that prevent a cursor from moving after prepend characters (Bug 24342);
@@ -480,7 +479,7 @@
     "$POcm = $PO $CM*;"
     "$PRcm = $PR $CM*;"
     "$QUcm = $QU $CM*;"
-    "$RIcm = $QU $CM*;"
+    "$RIcm = $RI $CM*;"
     "$SYcm = $SY $CM*;"
     "$WJcm = $WJ $CM*;";
 
@@ -522,6 +521,7 @@
     "$PO $CM+;"
     "$PR $CM+;"
     "$QU $CM+;"
+    "$RI $CM+;"
     "$SY $CM+;"
     "$WJ $CM+;"
     "$CR $LF {100};"
@@ -572,8 +572,10 @@
     "$BBcm [^$CB];"
     "$BBcm $LB20NonBreaks $CM*;"
     "$HLcm ($HYcm | $BAcm) [^$CB]?;"
+    "$SYcm $HLcm;"
     "($ALcm | $HLcm) $INcm;"
     "$CM+ $INcm;"
+    "$EXcm $INcm;"
     "$IDcm $INcm;"
     "$INcm $INcm;"
     "$NUcm $INcm;"
@@ -680,7 +682,9 @@
     "$CM* [$LB20NonBreaks-$CM] $CM* $BB;"
     "[^$CB] $CM* $BB;"
     "[^$CB] $CM* ($HY | $BA) $CM* $HL;"
+    "$CM* $HL $CM* $SY;"
     "$CM* $IN $CM* ($ALPlus | $HL);"
+    "$CM* $IN $CM* $EX;"
     "$CM* $IN $CM* $ID;"
     "$CM* $IN $CM* $IN;"
     "$CM* $IN $CM* $NU;"
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to