Hyphenation does not apply when there is only one word in a paragraph
Reported by
m...@thomasbachem.com,
Dec 5 2016
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.35 Safari/537.36 Steps to reproduce the problem: The attached test case wants the browser to hyphenate the word "hyphenationalgorithm" in English language on macOS. What is the expected behavior? It should display as: hyphen- ationalgo- rithm Safari & Firefox do it properly. What went wrong? Instead it doesn't get hyphenated at all. Did this work before? No Does this work in other browsers? Yes Chrome version: 55.0.2883.35 Channel: beta OS Version: OS X 10.11.2 Flash Version: Shockwave Flash 23.0 r0 Originating from issue 605840 and perhaps related to issue 668684 .
,
Dec 5 2016
,
Dec 6 2016
,
Dec 6 2016
,
Dec 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a commit f16ecaf4fc414d951fe9b1699d96e7eba3eab13a Author: kojii <kojii@chromium.org> Date: Wed Dec 07 12:48:11 2016 Apply hyphenation when there is only one word in a paragraph The logic not to hyphenate the last word in a paragraph also prevented single word in a paragraph from being hyphenated. This patch hyphenates the single word case, as an exception to the orphaned word. This is the same behavior with WebKit. This patch also fixes not to hyphenate the last word when followed by spaces. BUG= 671125 Review-Url: https://codereview.chromium.org/2557643002 Cr-Commit-Position: refs/heads/master@{#436926} [modify] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-auto-mock-expected.html [modify] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-auto-mock.html [add] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-orphaned-word-expected.html [add] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-orphaned-word.html [modify] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/Source/core/layout/LayoutText.h [modify] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/Source/core/layout/api/LineLayoutText.h [modify] https://crrev.com/f16ecaf4fc414d951fe9b1699d96e7eba3eab13a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
,
Dec 7 2016
Wow, really impressive how quickly you tackled this issue and issue 671129 . Thanks a lot for your great work!
,
Dec 7 2016
Thanks for your work on this, Koji! > This patch hyphenates the single word case, as an exception to the orphaned word. This is the same behavior with WebKit. Are you sure about this? In Safari 10.0.1 on Mac, I'm seeing hyphenation in the last word whether it's the only word or not.
,
Dec 7 2016
Attachment on my previous comment was missing a file extension. Sorry about that.
,
Dec 10 2016
#7/#8: There maybe cases where it does not work properly, but that is the intention, see https://bugs.webkit.org/show_bug.cgi?id=156803 If you see cases it does not work as intended with reproducing HTML, it'd be great to report to us/WebKit.
,
Dec 10 2016
Thank you for using this new feature and reporting the issue. This is fixed in today's Canary, it'd be great if you could try your pages with Canary.
,
Dec 10 2016
Your change meets the bar and is auto-approved for M56 (branch: 2924)
,
Dec 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f0960024d3e442a84d4a1d38a136553013635463 commit f0960024d3e442a84d4a1d38a136553013635463 Author: Koji Ishii <kojii@chromium.org> Date: Sat Dec 10 06:54:33 2016 Merge 2924: Apply hyphenation when there is only one word in a paragraph The logic not to hyphenate the last word in a paragraph also prevented single word in a paragraph from being hyphenated. This patch hyphenates the single word case, as an exception to the orphaned word. This is the same behavior with WebKit. This patch also fixes not to hyphenate the last word when followed by spaces. BUG= 671125 Review-Url: https://codereview.chromium.org/2557643002 Cr-Commit-Position: refs/heads/master@{#436926} (cherry picked from commit f16ecaf4fc414d951fe9b1699d96e7eba3eab13a) Review-Url: https://codereview.chromium.org/2560383002 . Cr-Commit-Position: refs/branch-heads/2924@{#446} Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059} [modify] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-auto-mock-expected.html [modify] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-auto-mock.html [add] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-orphaned-word-expected.html [add] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/LayoutTests/fast/text/hyphens/hyphens-orphaned-word.html [modify] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/Source/core/layout/LayoutText.h [modify] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/Source/core/layout/api/LineLayoutText.h [modify] https://crrev.com/f0960024d3e442a84d4a1d38a136553013635463/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
,
Dec 10 2016
#7/#8: a simple test for orphaned words, works both in Canary and Safari: http://jsbin.com/dunigu/edit?html,output
,
Dec 12 2016
As per the process. I think the fix is unlikely to cause other regressions.
,
Dec 12 2016
[Automated comment] Request affecting a post-stable build (M55), manual review required.
,
Dec 14 2016
Verified the fix on Mac 10.12.1 using Chrome Beta #56.0.2924.28 as per the comment #0. Observed that the attached html file displayed as expected as below: hyphen- ationalgo- rithm Hence, the fix is working as expected. Attaching the screencast for reference Adding the verified labels.
,
Dec 14 2016
The fix is larger than we'd like to see, this is a Pri-2 and M55 is already deployed to stable across all platforms, so we should wait for M56 on this. Rejecting merge, ping me if you have concerns. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by ranjitkan@chromium.org
, Dec 5 2016