WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
273339
FontCascadeFonts::primaryFont should work with a const FontCascadeDescription
https://bugs.webkit.org/show_bug.cgi?id=273339
Summary
FontCascadeFonts::primaryFont should work with a const FontCascadeDescription
Vitor Roriz
Reported
2024-04-26 14:00:04 PDT
font-size-adjust from-font resolution was fixed by [1]. It now works correctly and it uses the primary font for resolution. However, this patch changed FontCascadeFonts::primaryFont to receive a mutable (non-const) FontCascadeDescription object, such that it could resolve the from-font reference after the primary font is resolved. This means that now FontCascadeFonts::primaryFont does two different things: a) resolving and caching a font as the primary font b) resolving fromFont if necessary The (a) part of primaryFont doesn't require a mutable FontCascadeDescription. We can update FontCascadeDescription to have a method for resolving font-size-adjust from font at the point where we own a mutable FontCascadeDescription instead. This allows us to access the primaryFont itself from places where we only have access to a const FontCascadeDescription. This is for example, required for solving
https://bugs.webkit.org/show_bug.cgi?id=273233
, where we need to access primaryFont from FontCascadeFonts::glyphDataForVariant [1]
https://commits.webkit.org/269524@main
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-04-26 14:00:25 PDT
<
rdar://problem/127132471
>
Vitor Roriz
Comment 2
2024-04-26 15:53:08 PDT
(In reply to Vitor Roriz from
comment #0
)
> font-size-adjust from-font resolution was fixed by [1]. It now works > correctly and it uses the primary font for resolution. However, this patch > changed FontCascadeFonts::primaryFont to receive a mutable (non-const) > FontCascadeDescription object, such that it could resolve the from-font > reference after the primary font is resolved. > > > This means that now FontCascadeFonts::primaryFont does two different things: > a) resolving and caching a font as the primary font > b) resolving fromFont if necessary > > The (a) part of primaryFont doesn't require a mutable > FontCascadeDescription. We can update FontCascadeDescription to have a > method for resolving font-size-adjust from font at the point where we own a > mutable FontCascadeDescription instead. > > This allows us to access the primaryFont itself from places where we only > have access to a const FontCascadeDescription. This is for example, required > for solving
https://bugs.webkit.org/show_bug.cgi?id=273233
, where we need to > access primaryFont from FontCascadeFonts::glyphDataForVariant > > [1]
https://commits.webkit.org/269524@main
ops, I've linked the wrong commit. I was referring to
https://github.com/WebKit/WebKit/commit/89bdb0336c3b32a4130822ed976d858538e0d596
Vitor Roriz
Comment 3
2024-04-26 20:00:20 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/27829
EWS
Comment 4
2024-04-29 15:45:21 PDT
Committed
278130@main
(f923c324da2f): <
https://commits.webkit.org/278130@main
> Reviewed commits have been landed. Closing PR #27829 and removing active labels.
WebKit Commit Bot
Comment 5
2024-04-30 07:59:28 PDT
Re-opened since this is blocked by
bug 273491
Vitor Roriz
Comment 6
2024-04-30 10:20:44 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/27936
EWS
Comment 7
2024-05-01 11:50:14 PDT
Committed
278219@main
(44d3464ef15e): <
https://commits.webkit.org/278219@main
> Reviewed commits have been landed. Closing PR #27936 and removing active labels.
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