Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabulation characters in mixed directionality #2842

Closed
kojiishi opened this issue Jun 28, 2018 · 9 comments

Comments

Projects
None yet
5 participants
@kojiishi
Copy link
Contributor

commented Jun 28, 2018

By looking at crbug.com/318717 with @fantasai, I wasn't sure what the right answer for this.

test @ jsbin

Windows result, Gecko, Blink, Edge, LayoutNG from left. WebKit on Mac is the same as Gecko/Blink.
image

@kojiishi kojiishi added the css-text-3 label Jun 28, 2018

@upsuper

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

According to the HTML spec, element with dir attribute has unicode-bidi: bidi-override; and their corresponding direction. Based on the CSS Writing Modes spec, <div dir=ltr><span dir=rtl>&#9;0</span></div> is equivalent to a "LRO RLO S EN PDF PDF".

Looks like rendering it as <number><tab> is more correct? And vice versa for the last item.

@kojiishi

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2018

element with dir attribute has unicode-bidi: bidi-override

Isn't it bidi-isolate instead? So, LRI RLI S EN PDI PDI? The Unicode tool doesn't have isolate, so I guess I have to write a program to check ICU behavior.

@upsuper

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

Gecko's ua sheet uses unicode-bidi: isolate but HTML spec says bidi-override... I don't remember which one is correct...

@kojiishi

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2018

The second one is for iso-8859-8, and the first one is regular UA sheet.

I gave RLI S EN PDI to ICU, which resolved to 0 0 2 0. The same level as RLE S EN PDF, which reorders to <tab>0 order.

@kojiishi

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2018

But thank you, trying to match to UAX#9 is a good idea, I don't know why I didn't think about it. So maybe, if we think we should simply follow UAX#9 in this case, this is just a question about writing-modes.

@upsuper

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

Gecko does seem to have a different resolution on that specific sequence given the following testcase:

<!DOCTYPE html>
<style>
div {
  font-family: monospace;
  white-space: pre;
  background: yellow;
  display: inline-block;
}
</style>
<div>&#x2066;&#x2067;&#9;0&#x2069;&#x2069;</div>

I think we are using ICU internally as well :/

@xfq xfq added the i18n-tracking label Jul 1, 2018

@fantasai

This comment has been minimized.

Copy link
Collaborator

commented Jul 4, 2018

Just reviewed UAX9, I think it makes sense.

@kojiishi

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2018

Thanks, then either LayoutNG or Gecko doing incorrect pre-processing before giving the text to ICU. I'll double check.

@fantasai

This comment has been minimized.

Copy link
Collaborator

commented Sep 16, 2018

Added a note to the spec referencing UAX9: a15dde8
Closing this issue out. :) Let me know if there's anything else to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.