Bug 204485 - Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine at end of run
Summary: Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine at end o...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Local Build
Hardware: Mac macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-21 18:40 PST by Doug Kelly
Modified: 2019-12-03 15:41 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.78 KB, patch)
2019-11-21 19:17 PST, Doug Kelly
no flags Details | Formatted Diff | Diff
Patch (3.74 KB, patch)
2019-11-24 00:09 PST, Doug Kelly
no flags Details | Formatted Diff | Diff
Patch (6.24 KB, patch)
2019-12-02 18:43 PST, Doug Kelly
no flags Details | Formatted Diff | Diff
Patch (3.83 KB, patch)
2019-12-03 14:59 PST, Doug Kelly
no flags Details | Formatted Diff | Diff
Patch (3.79 KB, patch)
2019-12-03 15:03 PST, Doug Kelly
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Kelly 2019-11-21 18:40:41 PST
When encountering U_OTHER_NEUTRAL in createBidiRunsForLine at the end of a run, the current case asserts because the text direction cannot be determined in the current switch case.

Example:

<font dir="ltr">a</font>
<marquee>b</marquee>

<rdar://57201879>
Comment 1 Doug Kelly 2019-11-21 19:17:14 PST
Created attachment 384119 [details]
Patch
Comment 2 Ryosuke Niwa 2019-11-21 19:51:55 PST
Waiting for EWS.
Comment 3 Alexey Proskuryakov 2019-11-22 15:20:06 PST
Comment on attachment 384119 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384119&action=review

> Source/WebCore/platform/text/BidiResolver.h:900
> +                        // ASSERT_NOT_REACHED();

We don't use commented out code. Please remove before landing.
Comment 4 Ryosuke Niwa 2019-11-22 18:16:22 PST
Comment on attachment 384119 [details]
Patch

Oh, that's a good point. cq- for that.
Comment 5 Doug Kelly 2019-11-24 00:09:08 PST
Created attachment 384249 [details]
Patch
Comment 6 Sam Weinig 2019-11-24 11:00:04 PST
Comment on attachment 384249 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384249&action=review

> Source/WebCore/platform/text/BidiResolver.h:899
> +                        // FIXME: handle neutrals in this case.

Thanks for the patch Doug. Ideally, this would have a link to the bugzilla bug filed to fix this issue.
Comment 7 Doug Kelly 2019-12-02 18:43:23 PST
Created attachment 384675 [details]
Patch
Comment 8 Ryosuke Niwa 2019-12-03 02:14:16 PST
Comment on attachment 384675 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384675&action=review

> Source/WebCore/platform/text/BidiResolver.h:900
> +                        // FIXME: handle neutrals in this case.
> +                        // https://bugs.webkit.org/show_bug.cgi?id=204485

What Sam means is to file a new bug where this issue will be tracked.
Comment 9 Doug Kelly 2019-12-03 09:15:57 PST
Ah, apologies for the confusion.  I'm not sure if there's another bug we can track here, but I'll see what I can find.
Comment 10 Doug Kelly 2019-12-03 13:35:33 PST
This could be related to Bug 178960, since using ICU's bidi algorithm would likely remove the necessity for this code, but do we want a more specific bug tracking this issue?
Comment 11 Sam Weinig 2019-12-03 14:04:55 PST
(In reply to Doug Kelly from comment #10)
> This could be related to Bug 178960, since using ICU's bidi algorithm would
> likely remove the necessity for this code, but do we want a more specific
> bug tracking this issue?

Yes. There should be a new specific bug filed fix the issue identified.
Comment 12 Doug Kelly 2019-12-03 14:59:56 PST
Created attachment 384760 [details]
Patch
Comment 13 Ryosuke Niwa 2019-12-03 15:02:10 PST
Comment on attachment 384760 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384760&action=review

> Source/WebCore/platform/text/BidiResolver.h:900
> +                        // FIXME: handle neutrals in this case.
> +                        // Missing cases tracked by https://bugs.webkit.org/show_bug.cgi?id=204817

You can do this in a single like: // FIXME: handle neutrals in this case. See https://webkit.org/b/204817.
Comment 14 Doug Kelly 2019-12-03 15:03:47 PST
Created attachment 384761 [details]
Patch
Comment 15 WebKit Commit Bot 2019-12-03 15:41:33 PST
Comment on attachment 384761 [details]
Patch

Clearing flags on attachment: 384761

Committed r253068: <https://trac.webkit.org/changeset/253068>
Comment 16 WebKit Commit Bot 2019-12-03 15:41:35 PST
All reviewed patches have been landed.  Closing bug.