Title: [253068] trunk
Revision
253068
Author
commit-qu...@webkit.org
Date
2019-12-03 15:41:26 -0800 (Tue, 03 Dec 2019)

Log Message

Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine at end of run
https://bugs.webkit.org/show_bug.cgi?id=204485

Patch by Doug Kelly <do...@apple.com> on 2019-12-03
Reviewed by Ryosuke Niwa.

Source/WebCore:

Comment out the assert for the default case when setting direction at
the end of a bidirectional run.  The current algorithm may not fully
support UAX #9, but this assert also isn't helpful in development.

Test: fast/text/international/unicode-bidi-other-neutrals.html

* platform/text/BidiResolver.h:
(WebCore::DerivedClass>::createBidiRunsForLine):

LayoutTests:

Add a simple test case which illustrates a neutral at the end of a
Unicode bidirectional run.

* fast/text/international/unicode-bidi-other-neutrals-expected.html: Added.
* fast/text/international/unicode-bidi-other-neutrals.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (253067 => 253068)


--- trunk/LayoutTests/ChangeLog	2019-12-03 23:34:03 UTC (rev 253067)
+++ trunk/LayoutTests/ChangeLog	2019-12-03 23:41:26 UTC (rev 253068)
@@ -1,3 +1,16 @@
+2019-12-03  Doug Kelly  <do...@apple.com>
+
+        Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine at end of run
+        https://bugs.webkit.org/show_bug.cgi?id=204485
+
+        Reviewed by Ryosuke Niwa.
+
+        Add a simple test case which illustrates a neutral at the end of a
+        Unicode bidirectional run.
+
+        * fast/text/international/unicode-bidi-other-neutrals-expected.html: Added.
+        * fast/text/international/unicode-bidi-other-neutrals.html: Added.
+
 2019-12-03  Wenson Hsieh  <wenson_hs...@apple.com>
 
         fast/events/touch/ios/passive-by-default-on-document-and-window.html is a flaky failure

Added: trunk/LayoutTests/fast/text/international/unicode-bidi-other-neutrals-expected.html (0 => 253068)


--- trunk/LayoutTests/fast/text/international/unicode-bidi-other-neutrals-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/international/unicode-bidi-other-neutrals-expected.html	2019-12-03 23:41:26 UTC (rev 253068)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+  </head>
+  <body>
+    <font dir="ltr">a</font>
+    <marquee>b</marquee>
+  </body>
+</html>

Added: trunk/LayoutTests/fast/text/international/unicode-bidi-other-neutrals.html (0 => 253068)


--- trunk/LayoutTests/fast/text/international/unicode-bidi-other-neutrals.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/international/unicode-bidi-other-neutrals.html	2019-12-03 23:41:26 UTC (rev 253068)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+  </head>
+  <body>
+    <font dir="ltr">a</font>
+    <marquee>b</marquee>
+  </body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (253067 => 253068)


--- trunk/Source/WebCore/ChangeLog	2019-12-03 23:34:03 UTC (rev 253067)
+++ trunk/Source/WebCore/ChangeLog	2019-12-03 23:41:26 UTC (rev 253068)
@@ -1,3 +1,19 @@
+2019-12-03  Doug Kelly  <do...@apple.com>
+
+        Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine at end of run
+        https://bugs.webkit.org/show_bug.cgi?id=204485
+
+        Reviewed by Ryosuke Niwa.
+
+        Comment out the assert for the default case when setting direction at
+        the end of a bidirectional run.  The current algorithm may not fully
+        support UAX #9, but this assert also isn't helpful in development.
+
+        Test: fast/text/international/unicode-bidi-other-neutrals.html
+
+        * platform/text/BidiResolver.h:
+        (WebCore::DerivedClass>::createBidiRunsForLine):
+
 2019-12-03  Jer Noble  <jer.no...@apple.com>
 
         Adopt AVContentKeyReportGroup

Modified: trunk/Source/WebCore/platform/text/BidiResolver.h (253067 => 253068)


--- trunk/Source/WebCore/platform/text/BidiResolver.h	2019-12-03 23:34:03 UTC (rev 253067)
+++ trunk/Source/WebCore/platform/text/BidiResolver.h	2019-12-03 23:41:26 UTC (rev 253068)
@@ -896,7 +896,8 @@
                         m_direction = m_status.lastStrong == U_LEFT_TO_RIGHT ? U_LEFT_TO_RIGHT : U_EUROPEAN_NUMBER;
                         break;
                     default:
-                        ASSERT_NOT_REACHED();
+                        // FIXME: handle neutrals in this case. See https://bugs.webkit.org/show_bug.cgi?id=204817
+                        break;
                 }
                 appendRun();
             }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to