Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7055d79c3bd497977a15e4dd44b74d8ea6cb047b
https://github.com/WebKit/WebKit/commit/7055d79c3bd497977a15e4dd44b74d8ea6cb047b
Author: Vitor Roriz <[email protected]>
Date: 2026-06-18 (Thu, 18 Jun 2026)
Changed paths:
M Source/WebCore/platform/graphics/TextMeasurementCache.h
M Tools/TestWebKitAPI/Tests/WebCore/FontCascade.cpp
Log Message:
-----------
Test that purging inactive font data clears the shaped text cache
https://bugs.webkit.org/show_bug.cgi?id=317374
rdar://179997994
Reviewed by Tim Nguyen.
308842@main made GlyphBuffer hold weak Font references, so a GlyphBuffer cached
in a FontCascadeFonts shaped text cache can outlive its Fonts once they are
purged. 315309@main fixed this by clearing those caches in
FontCache::purgeInactiveFontData. Add a regression test that populates the
shaped text cache, purges inactive font data, and verifies the cache is
emptied. Expose TextMeasurementCache::isEmpty so the test can observe the cache.
* Source/WebCore/platform/graphics/TextMeasurementCache.h:
(WebCore::TextMeasurementCache::isEmpty const):
* Tools/TestWebKitAPI/Tests/WebCore/FontCascade.cpp:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/315462@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications