haikuwebkit/LayoutTests/fonts
Chris Dumez 338f0ca3b3 REGRESSION(r274992): Nullptr crash in FontCache::retrieveOrAddCachedFonts
https://bugs.webkit.org/show_bug.cgi?id=223858
<rdar://75883697>

Reviewed by Darin Adler and Ryosuke Niwa.

Source/WebCore:

Stop using a hash as key in the FontCascadeCache. Instead, use HashTraits and use
FontCascadeCacheKey as key.

Test: fonts/font-cache-crash.html

* platform/graphics/FontCache.cpp:
(WebCore::FontCache::retrieveOrAddCachedFonts):
(WTF::FontCascadeCacheKeyHash::hash):
* platform/graphics/FontCache.h:
(WebCore::FontCascadeCacheKey::operator== const):
(WTF::FontCascadeCacheKeyHash::equal):
(WTF::HashTraits<WebCore::FontCascadeCacheKey>::emptyValue):
(WTF::HashTraits<WebCore::FontCascadeCacheKey>::constructDeletedValue):
(WTF::HashTraits<WebCore::FontCascadeCacheKey>::isDeletedValue):

LayoutTests:

Add layout test coverage.

* fonts/font-cache-crash-expected.txt: Added.
* fonts/font-cache-crash.html: Added.


Canonical link: https://commits.webkit.org/235888@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-29 23:18:58 +00:00
..
cursive.html
default.html
fantasy.html
font-cache-crash-expected.txt REGRESSION(r274992): Nullptr crash in FontCache::retrieveOrAddCachedFonts 2021-03-29 23:18:58 +00:00
font-cache-crash.html REGRESSION(r274992): Nullptr crash in FontCache::retrieveOrAddCachedFonts 2021-03-29 23:18:58 +00:00
font-fallback-prefers-pictographs-expected.html Add SPI for telling WebKit to prefer pictograph glyphs over monochrome ones 2013-10-10 23:05:22 +00:00
font-fallback-prefers-pictographs.html Add SPI for telling WebKit to prefer pictograph glyphs over monochrome ones 2013-10-10 23:05:22 +00:00
ligature-expected.html [Win][Uniscribe] Material icons containing underscore or numbers aren't shown because ScriptItemize splits them apart 2020-07-22 20:04:21 +00:00
ligature.html
ligature.woff
lineheight5000-typolineheight2300.woff [Mac] Add support for the USE_TYPO_METRICS flag 2015-10-22 17:17:56 +00:00
monospace.html
sans-serif.html
serif.html
unicode-character-font-crash-expected.txt [WinCairo] Crash when font data pointer is null. 2015-01-05 15:05:46 +00:00
unicode-character-font-crash.html Unprefix -webkit-font-feature-settings 2015-10-05 17:27:16 +00:00
use-typo-metrics-1-expected.html [FreeType] Add support for the USE_TYPO_METRICS flag 2015-10-21 07:05:21 +00:00
use-typo-metrics-1.html
valid-standard-font-expected.txt
valid-standard-font.html