Bug 306059

Summary: Make WidthCache more generic, preparing for future improvement
Product: WebKit Reporter: Gerald Squelart <g_squelart>
Component: Layout and RenderingAssignee: Gerald Squelart <g_squelart>
Status: RESOLVED FIXED    
Severity: Enhancement CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 306235    

Gerald Squelart
Reported 2026-01-22 13:32:37 PST
As its name implies, WidthCache only caches widths (of given texts, per font). Some code paths (like CanvasRenderingContext2DBase::FontProxy::width() calling FontCascade::width()) also need to compute GlyphOverflow. These could benefit from also caching GlyphOverflow. This preliminary task here will only make WidthCache more generic, to allow the caching of other value types.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-01-22 13:32:43 PST
Gerald Squelart
Comment 2 2026-01-22 13:40:35 PST
EWS
Comment 3 2026-01-23 02:34:57 PST
Committed 306069@main (ed20cc0620d3): <https://commits.webkit.org/306069@main> Reviewed commits have been landed. Closing PR #57037 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.