WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 235937
[LFC][IFC] Using Fontcascade::spaceWidth to subtract the trailing space width may result in incorrect layout
https://bugs.webkit.org/show_bug.cgi?id=235937
Summary
[LFC][IFC] Using Fontcascade::spaceWidth to subtract the trailing space width...
zalan
Reported
2022-01-31 20:23:58 PST
when the primary font does not have space glyph.
Attachments
Patch
(5.14 KB, patch)
2022-01-31 20:28 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(5.32 KB, patch)
2022-02-01 08:16 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(5.16 KB, patch)
2022-02-01 09:06 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(52.97 KB, patch)
2022-02-01 13:04 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(52.58 KB, patch)
2022-02-01 20:18 PST
,
zalan
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2022-01-31 20:24:16 PST
<
rdar://88059633
>
zalan
Comment 2
2022-01-31 20:28:09 PST
Created
attachment 450492
[details]
Patch
zalan
Comment 3
2022-02-01 08:16:43 PST
Created
attachment 450529
[details]
Patch
zalan
Comment 4
2022-02-01 09:06:55 PST
Created
attachment 450538
[details]
Patch
Maciej Stachowiak
Comment 5
2022-02-01 12:10:21 PST
<
rdar://88059633
>
zalan
Comment 6
2022-02-01 13:04:45 PST
Created
attachment 450559
[details]
Patch
EWS
Comment 7
2022-02-01 14:53:21 PST
Committed
r288914
(
246654@main
): <
https://commits.webkit.org/246654@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 450559
[details]
.
WebKit Commit Bot
Comment 8
2022-02-01 20:02:17 PST
Re-opened since this is blocked by
bug 235998
zalan
Comment 9
2022-02-01 20:18:05 PST
Created
attachment 450605
[details]
Patch
zalan
Comment 10
2022-02-01 20:22:50 PST
null terminator? where we're going we don't need null terminator.
EWS
Comment 11
2022-02-01 21:52:10 PST
Committed
r288944
(
246674@main
): <
https://commits.webkit.org/246674@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 450605
[details]
.
Myles C. Maxfield
Comment 12
2022-02-01 22:20:40 PST
Comment on
attachment 450605
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=450605&action=review
> Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:94 > + return fontCascade.width(TextRun { String { &space, 1 } });
There are no performance problems with this?
zalan
Comment 13
2022-02-02 06:37:55 PST
(In reply to Myles C. Maxfield from
comment #12
)
> Comment on
attachment 450605
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=450605&action=review
> > > Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:94 > > + return fontCascade.width(TextRun { String { &space, 1 } }); > > There are no performance problems with this?
I had run our classic PerformanceTests/Layout/line-layout-simple.html microbenchmark locally before landing this and it showed about 0.5% regression. I also tested it with a slightly different version of the patch: const auto& spaceGlyphData = fontCascade.glyphDataForCharacter(space, false); return (!spaceGlyphData.font ? fontCascade.spaceWidth() : spaceGlyphData.font>widthForGlyph(spaceGlyphData.glyph)) + fontCascade.letterSpacing(); and it came back with the same numbers.
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