[Webkit-unassigned] [Bug 273339] New: FontCascadeFonts::primaryFont should work with a const FontCascadeDescription
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 26 14:00:04 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=273339
Bug ID: 273339
Summary: FontCascadeFonts::primaryFont should work with a const
FontCascadeDescription
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Text
Assignee: webkit-unassigned at lists.webkit.org
Reporter: vitor.roriz at apple.com
CC: fantasai.bugs at inkedblade.net, vitor.roriz at apple.com
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
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240426/2deb404a/attachment.htm>
More information about the webkit-unassigned
mailing list