Issue metadata
Sign in to add a comment
|
<span> may prevents the break opportunity before it
Reported by
arthur20...@gmail.com,
Feb 1 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.19 Safari/537.36 Example URL: https://zh.wikipedia.org/w/index.php?oldid=42990868 Steps to reproduce the problem: 1. Open the page 2. Look for the list of drugs in the infobox to the right, starting with "benzquinamide、LP-12、LP-211、LP-44" as of the time of reporting 3. count line lengths, and ask ... (Reproduced with guest profile; output acceptable on Firefox and MS Edge) What is the expected behavior? There are a bunch of better opportunities for line-breaking then Chrome's current choice. The IDEOGRAPHIC COMMA (、) used for listings, for example, should be prioritized over both hyphens and breaking between CJK ideographs. What went wrong? Chrome picked some pretty bad locations for line-breaking. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 57.0.2987.19 Channel: dev OS Version: 10.0 Flash Version: Shockwave Flash 24.0 r0 I actually tried adding <wbr> after these ideographic backward commas, but apparently it conveys no sense of priority.
,
Feb 2 2017
We might want to add IDEOGRAPHIC COMMA to the list of breakable characters.
,
Feb 2 2017
I don't have Windows to test at this moment but Chrome and Firefox breaks the same way on Mac. There are some discussion on implementing prioritized break opportunities, but no browsers have done it yet. That said, if you see differences between Chrome and Firefox/Edge, it's a coincidence. You will see opposite cases in other pages.
,
Feb 3 2017
Ugh.. By the way I tried a ​ (ZWSP) instead of a <wbr>.
,
Feb 4 2017
> I don't have Windows to test at this moment but Chrome and Firefox breaks the same way on Mac. They render differently, but the difference is subtle in the page provided by the reporter. The attached file is a minimum reproducible example of this issue. The punctuation itself doesn't matter, what matters here is that: * there is a <span> or <a> or some inline element wrapping the text, and * the punctuation connects a CJK character and a latin character. (I can understand this kind of bug, because I know handling line breaking on boundary of inline element is indeed very tricky :)
,
Feb 4 2017
Attaching a screenshot from #5, this looks like a bug, where a Latin word followed by "no-break-before" character can overflow. But is this what comment #0 talking about? I may misunderstand, but since #0 isn't talking about overflow, I guess #5 is different issue from #0.
,
Feb 5 2017
I think I understand the problem. The problem is common across platforms, but easier to see on Windows. IE/Edge breaks after ")" even without a space following it. This makes "7-hydroxy-2-(di-N-propylamino)tetralin" to break nicely on IE/Edge. Other than that, further minimized test case from #5: http://jsbin.com/dedimod/edit?html The <span> should not affect line break in this case.
,
Feb 5 2017
Can reproduce with ​ too.
,
Feb 5 2017
,
Feb 7 2017
Since Wikipedia permalinks can still change as transcluded templates change (and I may do some more poking around), here is an archive.is archive of the link provided above, generated just now: https://archive.fo/bKAAH
,
Feb 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7e4ae49ae351a0a0146a7fea90550c49a94bf7e0 commit 7e4ae49ae351a0a0146a7fea90550c49a94bf7e0 Author: kojii <kojii@chromium.org> Date: Wed Feb 08 03:46:03 2017 Fix line break at element boundary when 8bit element follows 16bit This patch fixes lines to break at element boundaries when 8it element follows 16bit element. BUG= 282134 , 687659 Review-Url: https://codereview.chromium.org/2686583003 Cr-Commit-Position: refs/heads/master@{#448898} [add] https://crrev.com/7e4ae49ae351a0a0146a7fea90550c49a94bf7e0/third_party/WebKit/LayoutTests/fast/text/line-break-8bit-after-16bit-expected.html [add] https://crrev.com/7e4ae49ae351a0a0146a7fea90550c49a94bf7e0/third_party/WebKit/LayoutTests/fast/text/line-break-8bit-after-16bit.html [modify] https://crrev.com/7e4ae49ae351a0a0146a7fea90550c49a94bf7e0/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
,
Feb 9 2017
The duplicated issue was fixed, thank you for reporting this issue. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by bokan@chromium.org
, Feb 1 2017