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 Rendering | Assignee: | 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: |
|
This only affects legacy layout; LFC works correctly. 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>) |
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.