Bug 279053

Summary: hyphens: auto; does not line break a phrase containing a non-breaking space in a grid-child
Product: WebKit Reporter: polarbirke
Component: Layout and RenderingAssignee: alan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, fantasai.bugs, koivisto, simon.fraser, vitor.roriz, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: Mac (Apple Silicon)   
OS: macOS 12   
Attachments:
Description Flags
Example HTML file to reproduce the bug
none
[fast-cq]Patch none

polarbirke
Reported 2024-09-03 03:43:56 PDT
Created attachment 472414 [details] Example HTML file to reproduce the bug Steps to reproduce the problem 1. Create a container that is constrained in width via CSS or the viewport (Example: 640px). 2. Create a second container inside the first and set it to use CSS Grid Layout in a configuration where the first column uses the available width (1fr) and the second column an absolute width (Example: 560px). 3. Create a grid-child (Example: div) for each column 4. Place a string containing a &nbsp; in the first column that is wider than the column (Example: "There are, sadly, a few incomprehensibilities&nbsp;(sic!).") Use the attached HTML file or visit https://codepen.io/polarbirke/full/WNqadrd. Problem Description The string should be broken up by hyphenation in a way that does not make the first grid-column exceed its upper width boundary (as constrained by the width on the grandparent and the fixed width of the other column). As soon as a non-breaking space is used, the column grows too wide. Everything works as expected without a non-breaking space.
Attachments
Example HTML file to reproduce the bug (1.90 KB, text/html)
2024-09-03 03:43 PDT, polarbirke
no flags
[fast-cq]Patch (5.79 KB, patch)
2024-09-10 12:46 PDT, alan
no flags
Radar WebKit Bug Importer
Comment 1 2024-09-10 03:44:13 PDT
alan
Comment 2 2024-09-10 12:46:02 PDT
Created attachment 472518 [details] [fast-cq]Patch
EWS
Comment 3 2024-09-10 17:19:29 PDT
Committed 283449@main (fe5ff0118ff6): <https://commits.webkit.org/283449@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 472518 [details].
Note You need to log in before you can comment on or make changes to this bug.