Issue metadata
Sign in to add a comment
|
Wrong whitespace position in wrapped rtl
Reported by
adrianla...@googlemail.com,
Dec 12 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 Example URL: Steps to reproduce the problem: Given a monospace textarea with a width of 6 characters with the following content: >>>><<<<< (order) 012387654 (storage position) Say ا ب ج What is the expected behavior? Firefox wraps like this: >>>><< (order) |012354| (storage position) |Say ا| <<< (order) |876 | (storage position) |ب ج | What went wrong? Chromium wraps like this: >>>><< (order) |012345| (storage position) |Say ا | <<< (order) |876 | (storage position) |ب ج | I argue that Chromium's behaviour is wrong, since 4 and 5 are part of an rtl span and thus their horizontal order should be reversed content order. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? No Does this work in other browsers? No Webkit Chrome version: 55 Channel: stable OS Version: Debian Flash Version: I confirmed this in Epiphany with Webkit 2.14.2 (https://bugs.webkit.org/show_bug.cgi?id=165753).
,
Dec 13 2016
,
Dec 13 2016
Would you mind routing this to someone who can look into it Koji? Thanks!
,
Dec 14 2016
I think this is by design, but I'm not native speaker of bidi scripts, so please correct me if anything looks wrong with the below. ## Test http://output.jsbin.com/qilasaw Gecko: Puts the trailing space before (as you expect) only when wrapping. It looks like it collapses the whitespace after that. Edge: Same as Gecko but doesn't collapse it. ## UBA Test http://unicode.org/cldr/utility/bidi.jsp?a=Say+%D8%A7+%D8%A8+%D8%AC%0D%0ASay+%D8%A7+%0D%0A&p=LTR You're right that the space goes before "ا" without wrapping, but bidi reordering applies after line breaks, so it should be the same as "Paragraph 2" above. It shows that the space should appear after "ا". Note that, although this is unicode.org site, this tool isn't updated, so may be showing old behavior. ## As a user... Why would you want two spaces there? It looks like unnatural to me. Do you have use cases where your display order is useful?
,
Dec 21 2016
I think, in your example without wrapping the trailing space is not to the left because it is not considered to be part of a rtl section. UBA test confirms that[1]: The WS both have resulting level 0. If you add a RLM[2] to the end the last WS is on level 1 and displayed to the left. [1] http://unicode.org/cldr/utility/bidi.jsp?a=Say+%D8%A7+&p=LTR [2] http://unicode.org/cldr/utility/bidi.jsp?a=Say+%D8%A7+%E2%80%8F&p=LTR As a user, I don't know what behavior you would want here. I've never written from right to left. I'm currently working on CodeMirror's bidi support and a certain level of consistency in browser behavior would help with that. What Firefox does matches my mental model in this case.
,
Dec 27 2016
Resetting trailing spaces to the paragraph embedding level is called L1[1], and you're right that Blink doesn't support it very well yet. This is tracked in issue 316409. We're discussing how to fix it, but it'll probably not in short term. But my knowledge on bidi still prevents to understand this is about the lack of L1 when our result and UBA test matches, unless, as you noted, a RLM is added to the end, but I can't understand why we should add RLM to the end of line. If you agree that this is about the lack of L1, I can merge this to issue 316409. If you have other information than just L1, I'd appreciate to know. [1] http://unicode.org/reports/tr9/#L1
,
Jan 24 2017
,
Jan 25 2017
I'm somewhat convinced Blink is showing the right behavior and Firefox is wrong. I just didn't know about L1 at all. I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1331501.
,
Jan 27 2017
Thanks, there are experts in Gecko team, their opinions are helpful. I'll keep this as Duplicate rather than WontFix. I will probably revisit L1 in Blink sometime in one of our long term projects, and will keep this to be re-tested when we do so. Apologies it's not happening sooner.
,
Feb 16 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kochi@chromium.org
, Dec 13 2016