[Webkit-unassigned] [Bug 273339] FontCascadeFonts::primaryFont should work with a const FontCascadeDescription

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 26 15:53:08 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=273339

--- Comment #2 from Vitor Roriz <vitor.roriz at apple.com> ---
(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

-- 
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/da27b28f/attachment.htm>


More information about the webkit-unassigned mailing list