Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jan 2018 20:17:12 +0000 (20:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jan 2018 20:17:12 +0000 (20:17 +0000)
commit5dac2f3a255fbcab49886fbdabe15bfd2581bb0e
tree68d092865e7816678d641a1da5069acc9c8c6cb3
parent1f99ed0b0d18f83ffe9e4270fa139278d736a619
Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
https://bugs.webkit.org/show_bug.cgi?id=180979
<rdar://problem/36146670>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-03
Reviewed by Matt Baker.

Source/WebCore:

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(fontNameIsSystemFont):
(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@226371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/css/get-system-fonts.html
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp