WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
272534
Break-word with a float can discard text
https://bugs.webkit.org/show_bug.cgi?id=272534
Summary
Break-word with a float can discard text
Caleb Hearon
Reported
2024-04-11 09:20:48 PDT
I found a case where Safari doesn't render text after a float when the float is inside a word that splits across multiple lines with word-break: break-word. Quick link:
https://jsfiddle.net/317e6a9f/
With the following HTML and CSS: <div style="word-break: break-word; width: 20px;"> abcd<div style="float: left; width: 5px; height: 5px; background-color: red;"></div>efghijk </div> The letters "ef" get placed after the float successfully, but the letters "ghijk" don't show up at all, and no line boxes are allocated for them. Tested in Safari TP and Safari 17. Chrome does this correctly. Firefox puts the float on its own line, which doesn't seem right since letters would fit after. But I don't think the specs say much specifically about when floats can be placed.
Attachments
rendering in safari, firefox, chrome
(319.58 KB, image/png)
2024-04-11 17:27 PDT
,
Karl Dubost
no flags
Details
screen recording of the layout with/without break-word in STP 192
(1.82 MB, video/quicktime)
2024-04-11 17:33 PDT
,
Karl Dubost
no flags
Details
[fast-cq]Patch
(4.37 KB, patch)
2024-04-13 05:46 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2024-04-11 17:27:08 PDT
Created
attachment 470874
[details]
rendering in safari, firefox, chrome Safari Technology Preview 192 19619.1.8.1 Firefox Nightly 126.0a1 12624.4.11 Google Chrome Canary 125.0.6413.0 6413.0
Radar WebKit Bug Importer
Comment 2
2024-04-11 17:28:09 PDT
<
rdar://problem/126309547
>
Karl Dubost
Comment 3
2024-04-11 17:33:53 PDT
Created
attachment 470875
[details]
screen recording of the layout with/without break-word in STP 192 Flipping on/off the word-break: break-word shows what is happening.
zalan
Comment 4
2024-04-13 05:46:10 PDT
Created
attachment 470912
[details]
[fast-cq]Patch
EWS
Comment 5
2024-04-13 12:29:42 PDT
Committed
277461@main
(30130d3b5da2): <
https://commits.webkit.org/277461@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 470912
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug