Bug 228228 - Inline element can trigger incorrect line break with word-break: break-all and white-space: pre-wrap
Summary: Inline element can trigger incorrect line break with word-break: break-all an...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 14
Hardware: Mac (Apple Silicon) macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-23 02:55 PDT by Ian Henderson
Modified: 2021-07-30 02:56 PDT (History)
4 users (show)

See Also:


Attachments
test case (571 bytes, text/html)
2021-07-23 02:55 PDT, Ian Henderson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>