Skip to content

Commit

Permalink
Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine …
Browse files Browse the repository at this point in the history
…at end of run

https://bugs.webkit.org/show_bug.cgi?id=204485

Patch by Doug Kelly <dougk@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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@253068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
commit-queue@webkit.org committed Dec 3, 2019
1 parent bbb6507 commit b1ff2dd
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 1 deletion.
13 changes: 13 additions & 0 deletions LayoutTests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2019-12-03 Doug Kelly <dougk@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_hsieh@apple.com>

fast/events/touch/ios/passive-by-default-on-document-and-window.html is a flaky failure
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>
<font dir="ltr">a</font>
<marquee>b</marquee>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>
<font dir="ltr">a</font>
<marquee>b</marquee>
</body>
</html>
16 changes: 16 additions & 0 deletions Source/WebCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
2019-12-03 Doug Kelly <dougk@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.noble@apple.com>

Adopt AVContentKeyReportGroup
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/platform/text/BidiResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,8 @@ void BidiResolverBase<Iterator, Run, DerivedClass>::createBidiRunsForLine(const
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();
}
Expand Down

0 comments on commit b1ff2dd

Please sign in to comment.