WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
227337
[Legacy line layout] Incorrect wrap position at <wbr> in "white-space: pre" content.
https://bugs.webkit.org/show_bug.cgi?id=227337
Summary
[Legacy line layout] Incorrect wrap position at <wbr> in "white-space: pre" c...
Cameron McCormack (:heycam)
Reported
2021-06-23 21:30:16 PDT
Created
attachment 432131
[details]
test Noticed this looking at
https://developer.apple.com/documentation/coretext/1510813-ctfontgetglyphsforcharacters?language=objc
. STR: 1. Open the attached test. 2. Click somewhere in the "Char" of "UniChar". 3. Notice that the line of text wraps (and not all of it gets repainted). Are we incorrectly computing the intrinsic minimum width of the text by not taking into account the word wrap opportunities? Doesn't reproduce with LFC for inline layout turned off.
Attachments
test
(304 bytes, text/html)
2021-06-23 21:30 PDT
,
Cameron McCormack (:heycam)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
alan
Comment 1
2021-06-24 08:09:21 PDT
Yeah, it happens when legacy line layout and IFC disagrees on the layout. According to
https://www.w3.org/TR/css-text-3/#white-space-property
, white-space: pre -> "Lines only break at forced line breaks; content that does not fit within the block container overflows it." While <wbr> acts as a line breaking opportunity, it is not a forced line break. IFC layout also matches FF. Sadly, clicking on the content forces us to fallback to legacy line layout and it makes the content wrap and we fail to make the containing block taller (as the fallback code only runs the line layout and not the block one) We need to patch legacy line layout.
alan
Comment 2
2021-06-24 08:16:02 PDT
>Are we incorrectly computing the intrinsic minimum width of the text by not taking into account the word wrap opportunities?
The content in inside a fixed width containing block, so we don't really compute intrinsic width here. It's simply about ignoring the soft line break opportunities (<wbr>) and letting the content overflow as specified by the spec.
Radar WebKit Bug Importer
Comment 3
2021-06-30 21:31:21 PDT
<
rdar://problem/80001586
>
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