Bug 265252 - Text in flex items not breaking under specific conditions
Summary: Text in flex items not breaking under specific conditions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 17
Hardware: Mac (Apple Silicon) macOS 14
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-22 08:59 PST by Kevin Muncie
Modified: 2023-11-26 09:43 PST (History)
15 users (show)

See Also:


Attachments
Test HTML page showing bug and other permutation which do not exhibit bug (5.71 KB, text/html)
2023-11-22 08:59 PST, Kevin Muncie
no flags Details
Screenshot showing issue across three browsers (145.04 KB, image/png)
2023-11-22 09:00 PST, Kevin Muncie
no flags Details
Test reduction (417 bytes, text/html)
2023-11-25 19:11 PST, zalan
no flags Details
Test reduction (301 bytes, text/html)
2023-11-25 19:19 PST, zalan
no flags Details
[fast-cq]Patch (5.69 KB, patch)
2023-11-25 20:48 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Muncie 2023-11-22 08:59:41 PST
Created attachment 468729 [details]
Test HTML page showing bug and other permutation which do not exhibit bug

This is a very peculiar bug that only seems to be happening in Safari. It was discovered when trying to render Cambodian text in a flex child, though the bug exists even when displaying Roman scripts.

In a Flexbox child, with a text string containing no (U+0020) spaces, IF the text:

- contains an inline-block element
- has zero-width space (U+200B) characters between each word
- all elements are wrapped in span elements

A screenshot and example HTML document for testing is being attached.
Comment 1 Kevin Muncie 2023-11-22 09:00:11 PST
Created attachment 468730 [details]
Screenshot showing issue across three browsers
Comment 2 zalan 2023-11-25 19:11:15 PST
Created attachment 468755 [details]
Test reduction
Comment 3 Radar WebKit Bug Importer 2023-11-25 19:12:03 PST
<rdar://problem/118796634>
Comment 4 zalan 2023-11-25 19:19:40 PST
Created attachment 468756 [details]
Test reduction

and now with no flex.
Comment 5 zalan 2023-11-25 20:48:26 PST
Created attachment 468757 [details]
[fast-cq]Patch
Comment 6 zalan 2023-11-25 20:51:14 PST
Thank you for filing this issue! This is indeed a peculiar bug.
Comment 7 EWS 2023-11-26 09:42:58 PST
Committed 271122@main (073d84471418): <https://commits.webkit.org/271122@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 468757 [details].