Bug 197970 - [css-text] break-spaces hangs a sequence of white spaces if it completely overflows the line length
Summary: [css-text] break-spaces hangs a sequence of white spaces if it completely ove...
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:
Depends on:
Blocks:
 
Reported: 2019-05-16 16:26 PDT by Javier Fernandez
Modified: 2020-04-14 11:52 PDT (History)
7 users (show)

See Also:


Attachments
Test case to reproduce the issue (164 bytes, text/html)
2019-05-16 16:26 PDT, Javier Fernandez
no flags Details
Actual result (493 bytes, image/png)
2019-05-16 16:29 PDT, Javier Fernandez
no flags Details
Expected result (448 bytes, image/png)
2019-05-16 16:29 PDT, Javier Fernandez
no flags Details
Patch (8.03 KB, patch)
2019-06-05 09:01 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff
Patch (8.67 KB, patch)
2019-06-06 02:14 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff
Patch (8.49 KB, patch)
2019-06-06 02:18 PDT, Javier Fernandez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (3.09 MB, application/zip)
2019-06-06 03:33 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Fernandez 2019-05-16 16:26:28 PDT
Created attachment 370085 [details]
Test case to reproduce the issue

What steps will reproduce the problem?
(1) Load the attached test case

What is the expected result?

The line is broken after the first space after the word ("XXXX |  XX"), assuming such space overflows the line; the rest of the white space sequence should me moved to the next line (expected.png)

What happens instead?

The line is broken after the last white space character, letting the whole sequence to overflow ("XXXX   |XX"); the next word is moved to the beginning of the next line (actual.png)
Comment 1 Javier Fernandez 2019-05-16 16:29:08 PDT
Created attachment 370086 [details]
Actual result
Comment 2 Javier Fernandez 2019-05-16 16:29:26 PDT
Created attachment 370087 [details]
Expected result
Comment 3 Javier Fernandez 2019-05-16 16:30:38 PDT
This bug only happens when executing the SimpleLineLayout codepath, so WebKitGtk+ and WPE are not affected y this bug.
Comment 4 Javier Fernandez 2019-05-16 16:32:03 PDT
I noticed that forcing a relayout (by selecting some text and running the web inspector) produces a line breaking like the one described in the expected results (expected.png).
Comment 5 Javier Fernandez 2019-06-05 09:01:02 PDT
Created attachment 371403 [details]
Patch
Comment 6 Javier Fernandez 2019-06-06 02:14:49 PDT
Created attachment 371480 [details]
Patch

Some refactoring
Comment 7 Javier Fernandez 2019-06-06 02:18:25 PDT
Created attachment 371481 [details]
Patch

Rephrase comments
Comment 8 EWS Watchlist 2019-06-06 03:33:15 PDT
Comment on attachment 371481 [details]
Patch

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

New failing tests:
http/wpt/service-workers/service-worker-networkprocess-crash.html
Comment 9 EWS Watchlist 2019-06-06 03:33:17 PDT
Created attachment 371484 [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 10 Diego Pino 2020-03-12 03:29:38 PDT
Fixed by r257562.
Comment 11 zalan 2020-03-15 08:17:44 PDT
(In reply to Diego Pino from comment #10)
> Fixed by r257562.
Yay. IFC FTW!
Comment 12 zalan 2020-03-15 08:18:52 PDT
I guess this patch should be marked obsolete.