Soft hyphens are completely broken when they fall at the end of a text node
Reported by
chris.mo...@gmail.com,
Aug 19 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0 Example URL: Steps to reproduce the problem: 1. Create one or more text nodes that end with U+00AD SOFT HYPHEN (­ if you’re lazy). For example, as a part of a fancy precise TeX-like text layout algorithm with advanced hyphenation control. A couple of easy ways: - Wrap each syllable (with its soft hyphen after it) in a span; - Put a comment between the soft hyphen and what comes next. Or just programmatically create multiple adjacent text nodes. Who needs a normalised DOM tree? What is the expected behavior? It should behave just the same as if all the text were in one text node. Splitting a text node into multiple adjacent text nodes should never make any difference to rendering. What went wrong? When the soft hyphens are ending the text nodes, the line is permitted to break at that point, but the potential hyphen’s width is *always* removed from the line length—even ones that aren’t at the end of the line and are thus zero-width—and the hyphen isn’t actually drawn at the end of the line anyway. All round buggy behaviour. Attached is a demo of the issue taken to its extreme of inserting a soft hyphen after every character. The column of text ends up effectively only 60% wide rather than 100%. 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? Yes Chrome version: 54.0.2832.2 Channel: canary OS Version: 10.0 Flash Version: Firefox Nightly and Edge Preview are both handling it correctly. I expect older browsers without a webkit heritage to be fine also. It’s been around for at least five years, as https://github.com/bramstein/typeset/blob/c56da3a51ab57b3c20468c0a2ff5bcc8aa9291da/examples/flatland/index.html#L227 has been having to work around the bug.
,
Aug 19 2016
,
Aug 21 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 22 2017
,
Aug 22
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 23
I confirm that this is still a bug, and I’d still like it to be fixed.
,
Aug 26
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dtapu...@chromium.org
, Aug 19 2016