Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ed20cc0620d3c827a1b6feca9bee3fa2e8fb7c23
https://github.com/WebKit/WebKit/commit/ed20cc0620d3c827a1b6feca9bee3fa2e8fb7c23
Author: Gerald Squelart <[email protected]>
Date: 2026-01-23 (Fri, 23 Jan 2026)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/graphics/FontCache.cpp
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/platform/graphics/FontCascadeCache.cpp
M Source/WebCore/platform/graphics/FontCascadeCache.h
M Source/WebCore/platform/graphics/FontCascadeFonts.h
A Source/WebCore/platform/graphics/TextMeasurementCache.h
R Source/WebCore/platform/graphics/WidthCache.h
Log Message:
-----------
Refactor WidthCache into TextMeasurementCache<float>
https://bugs.webkit.org/show_bug.cgi?id=306059
rdar://168702176
Reviewed by Simon Fraser.
This shouldn't change actual code (yet), and will allow future changes
to what the cache actually stores.
Remove references to GlyphOverflow from this now-generic code, as it's
not currently cached.
FontCascade::width() now only use the WidthCache when there's no need
for GlyphOverflow; even if the cache had been updated to return cached
values, in case of cache misses the following FontCascade::width() code
wouldn't store new computed values, so something needed to change anyway.
Existing WidthCache tests already cover this code.
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/FontCache.cpp:
(WebCore::FontCache::releaseNoncriticalMemory):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::width const): Only use WidthCache when there's no
GlyphOverflow; even if the cache had been updated to
* Source/WebCore/platform/graphics/FontCascadeCache.cpp:
(WebCore::FontCascadeCache::clearMeasurementCaches):
(WebCore::FontCascadeCache::clearWidthCaches): Deleted.
* Source/WebCore/platform/graphics/FontCascadeCache.h:
* Source/WebCore/platform/graphics/FontCascadeFonts.h:
* Source/WebCore/platform/graphics/TextMeasurementCache.h: Renamed from
Source/WebCore/platform/graphics/WidthCache.h.
(WebCore::TextMeasurementCache::TextMeasurementCache):
(WebCore::TextMeasurementCache::add):
(WebCore::TextMeasurementCache::addSlowCase):
Canonical link: https://commits.webkit.org/306069@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications