Bug 228228

Summary: Inline element can trigger incorrect line break with word-break: break-all and white-space: pre-wrap
Product: WebKit Reporter: Ian Henderson <ian>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Apple Silicon)   
OS: macOS 11   
Attachments:
Description Flags
test case none

Description Ian Henderson 2021-07-23 02:55:14 PDT
Created attachment 434077 [details]
test case

See attached test case.  In Blink and Gecko, all three white-space settings produce the same result.  In WebKit, the first setting (white-space: pre-wrap) produces a different layout when an inline element is added.
Comment 1 Sam Sneddon [:gsnedders] 2021-07-23 04:38:26 PDT
This only affects legacy layout; LFC works correctly.
Comment 2 zalan 2021-07-23 06:42:10 PDT
It looks like we drop the word-break property for the rest of the content when we see an inline box (unless it is explicitly set on the content again e.g. <div style='white-space: pre-wrap'><b>asdf</b> <span style="word-break: break-all">alsdjfalk</span></div>)
Comment 3 Radar WebKit Bug Importer 2021-07-30 02:56:17 PDT
<rdar://problem/81317182>