RESOLVED FIXED 165796
text-align: justify and word-spacing combine to overflow column
https://bugs.webkit.org/show_bug.cgi?id=165796
Summary text-align: justify and word-spacing combine to overflow column
Brad West
Reported 2016-12-13 06:02:04 PST
Created attachment 297005 [details] HTML with inline CSS demonstrating problem When text-align: justify is used in combination with word-spacing, the text will almost always overflows a column (horizontally). In attached HTML, an exaggerated value of 20px is used for word-spacing, but the problem also occurs with smaller, more reasonable values. Of note is the fifth line (ending in "post-ironic.") that, for whatever reason, does not overflow. Curiously, the amount that it overflows seems to be the exact value used for word-spacing. Hopefully that suggests something about the nature of the bug. It also means that for most lines, one could work around the issue by specifying a padding-right value with the same value as word-spacing. Unfortunately, though, the lines that work above ("post-ironic") become too far inset.
Attachments
HTML with inline CSS demonstrating problem (4.10 KB, text/html)
2016-12-13 06:02 PST, Brad West
no flags
Text overflows bounds of p when justify and word-spacing both used (144.48 KB, image/png)
2016-12-13 06:04 PST, Brad West
no flags
Text behaves as expected when only justify is used (111.88 KB, image/png)
2016-12-13 06:05 PST, Brad West
no flags
Text also behaves if only word-spacing is used (130.21 KB, image/png)
2016-12-13 06:05 PST, Brad West
no flags
Workaround with padding-right, successful except for "post-ironic" line (139.70 KB, image/png)
2016-12-13 06:07 PST, Brad West
no flags
Patch (90.29 KB, patch)
2016-12-14 21:56 PST, zalan
no flags
Patch (90.36 KB, patch)
2016-12-14 22:05 PST, zalan
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (18.11 MB, application/zip)
2016-12-15 01:08 PST, Build Bot
no flags
Patch (93.37 KB, patch)
2016-12-15 08:13 PST, zalan
no flags
Patch (93.34 KB, patch)
2016-12-15 19:55 PST, zalan
no flags
Brad West
Comment 1 2016-12-13 06:04:32 PST
Created attachment 297006 [details] Text overflows bounds of p when justify and word-spacing both used
Brad West
Comment 2 2016-12-13 06:05:11 PST
Created attachment 297007 [details] Text behaves as expected when only justify is used
Brad West
Comment 3 2016-12-13 06:05:42 PST
Created attachment 297008 [details] Text also behaves if only word-spacing is used
Brad West
Comment 4 2016-12-13 06:07:41 PST
Created attachment 297009 [details] Workaround with padding-right, successful except for "post-ironic" line
zalan
Comment 5 2016-12-14 16:16:43 PST
*** Bug 165873 has been marked as a duplicate of this bug. ***
zalan
Comment 6 2016-12-14 16:28:10 PST
zalan
Comment 7 2016-12-14 21:56:23 PST
zalan
Comment 8 2016-12-14 22:05:00 PST
Build Bot
Comment 9 2016-12-15 01:08:25 PST
Comment on attachment 297166 [details] Patch Attachment 297166 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2726869 New failing tests: fast/text/whitespace/span-in-word-space-causes-overflow.html css1/text_properties/word_spacing.html
Build Bot
Comment 10 2016-12-15 01:08:29 PST
Created attachment 297184 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
zalan
Comment 11 2016-12-15 08:13:54 PST
zalan
Comment 12 2016-12-15 08:14:23 PST
Comment on attachment 297184 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 Some iOS rebaseline.
Myles C. Maxfield
Comment 13 2016-12-15 18:19:59 PST
Comment on attachment 297192 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=297192&action=review > LayoutTests/fast/css/word-spacing-with-normal-layout.html:18 > +if (window.internals) > + internals.settings.setSimpleLineLayoutDebugBordersEnabled(false); Why is this here?
zalan
Comment 14 2016-12-15 19:54:30 PST
(In reply to comment #13) > Comment on attachment 297192 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=297192&action=review > > > LayoutTests/fast/css/word-spacing-with-normal-layout.html:18 > > +if (window.internals) > > + internals.settings.setSimpleLineLayoutDebugBordersEnabled(false); > > Why is this here? lol, good catch. It was meant to read setSimpleLineLayoutEnabled.
zalan
Comment 15 2016-12-15 19:55:36 PST
WebKit Commit Bot
Comment 16 2016-12-15 22:33:13 PST
Comment on attachment 297291 [details] Patch Clearing flags on attachment: 297291 Committed r209910: <http://trac.webkit.org/changeset/209910>
WebKit Commit Bot
Comment 17 2016-12-15 22:33:18 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.