Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jan 2018 04:16:06 +0000 (04:16 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jan 2018 04:16:06 +0000 (04:16 +0000)
commit9d2c9103e40be3149d1d2df1c0a302d756f17a1d
tree2407a9a6f3b7aec8c3525a9e4b7ac1e71a328118
parent2c1c576c08ee4d3513e7fbc425e668a99961b805
Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
https://bugs.webkit.org/show_bug.cgi?id=180979
<rdar://problem/36146670>

Reviewed by Matt Baker.

Source/WebCore:

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::systemFontFamilies):
Switch to the original Mac algorithm before r180979 that uses
CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't
available on iOS but now it is. This is a performance improvement on
both platforms, but significantly so on macOS. It also finds more,
valid, family names.

LayoutTests:

* inspector/css/get-system-fonts.html:
Cleanup the test a bit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/css/get-system-fonts.html
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp