Bug 197278 - line should not be broken before the first space after a word
Summary: line should not be broken before the first space after a word
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Javier Fernandez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-25 04:12 PDT by Javier Fernandez
Modified: 2019-04-29 12:58 PDT (History)
6 users (show)

See Also:


Attachments
Test case to reproduce the issue (256 bytes, text/html)
2019-04-25 04:12 PDT, Javier Fernandez
no flags Details
Actual result (783 bytes, image/png)
2019-04-25 04:14 PDT, Javier Fernandez
no flags Details
Expected result (733 bytes, image/png)
2019-04-25 04:14 PDT, Javier Fernandez
no flags Details
Patch (52.39 KB, patch)
2019-04-26 09:51 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (3.21 MB, application/zip)
2019-04-26 10:50 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.78 MB, application/zip)
2019-04-26 11:08 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-highsierra (2.89 MB, application/zip)
2019-04-26 11:39 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.75 MB, application/zip)
2019-04-26 11:48 PDT, Build Bot
no flags Details
Patch (52.27 KB, patch)
2019-04-29 03:42 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff
Patch (55.11 KB, patch)
2019-04-29 04:24 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff
Patch (57.93 KB, patch)
2019-04-29 05:13 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Fernandez 2019-04-25 04:12:14 PDT
Created attachment 368228 [details]
Test case to reproduce the issue

What steps will reproduce the problem?
(1) Load the attached test cas 
(2)
(3)

What is the expected result?

The line is broken before the first word: "X |XX X" (expected.png)

What happens instead?

The line is broken just after the second word: "X XX| X" (actual.png)
Comment 1 Javier Fernandez 2019-04-25 04:14:25 PDT
Created attachment 368230 [details]
Actual result
Comment 2 Javier Fernandez 2019-04-25 04:14:41 PDT
Created attachment 368231 [details]
Expected result
Comment 3 Javier Fernandez 2019-04-26 09:39:40 PDT
This bug is related to a discussion [1] I held recently with the CSS WG regarding how different combinations of line breaking properties should handle the first space after a word as potential breaking opportunities.

[1] https://github.com/w3c/csswg-drafts/issues/3701
Comment 4 Javier Fernandez 2019-04-26 09:51:04 PDT
Created attachment 368323 [details]
Patch
Comment 5 Build Bot 2019-04-26 10:50:03 PDT
Comment on attachment 368323 [details]
Patch

Attachment 368323 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12006893

New failing tests:
imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html
Comment 6 Build Bot 2019-04-26 10:50:05 PDT
Created attachment 368336 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 7 Build Bot 2019-04-26 11:08:08 PDT
Comment on attachment 368323 [details]
Patch

Attachment 368323 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12007046

New failing tests:
imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html
Comment 8 Build Bot 2019-04-26 11:08:10 PDT
Created attachment 368337 [details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 9 Build Bot 2019-04-26 11:39:03 PDT
Comment on attachment 368323 [details]
Patch

Attachment 368323 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12007190

New failing tests:
imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html
Comment 10 Build Bot 2019-04-26 11:39:05 PDT
Created attachment 368340 [details]
Archive of layout-test-results from ews117 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 11 Build Bot 2019-04-26 11:48:01 PDT
Comment on attachment 368323 [details]
Patch

Attachment 368323 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12007282

New failing tests:
imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html
Comment 12 Build Bot 2019-04-26 11:48:03 PDT
Created attachment 368341 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 13 Javier Fernandez 2019-04-29 03:42:10 PDT
Created attachment 368447 [details]
Patch

Patch rebased
Comment 14 Javier Fernandez 2019-04-29 04:24:20 PDT
Created attachment 368448 [details]
Patch

Fixed bugs in SimpleLayoutLine codepath
Comment 15 Javier Fernandez 2019-04-29 05:13:50 PDT
Created attachment 368449 [details]
Patch

Fixed errors in TestExpectations
Comment 16 WebKit Commit Bot 2019-04-29 12:57:02 PDT
Comment on attachment 368449 [details]
Patch

Clearing flags on attachment: 368449

Committed r244748: <https://trac.webkit.org/changeset/244748>
Comment 17 WebKit Commit Bot 2019-04-29 12:57:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Radar WebKit Bug Importer 2019-04-29 12:58:16 PDT
<rdar://problem/50307483>