[Cocoa] Improve performance of font lookups
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jul 2017 23:04:18 +0000 (23:04 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jul 2017 23:04:18 +0000 (23:04 +0000)
commitf7805daa3c468557537a8463f402588c2934c7b9
tree8d328c34e1123fd86b5a5378344d0dbd6e2a1ba3
parentbbc7998d230e8619f140851fb4a77ae96deb6051
[Cocoa] Improve performance of font lookups
https://bugs.webkit.org/show_bug.cgi?id=173960
<rdar://problem/31996891>

Reviewed by Darin Adler.

PerformanceTests:

* Layout/font-fallback-font-family.html: Added.
* Layout/resources/font-fallback-font-family.html: Added.

Source/WebCore:

Looking up kCTFontPostScriptNameAttribute is faster than kCTFontNameAttribute.

No new tests because there is no behavior change.

* platform/spi/cocoa/CoreTextSPI.h:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::fontForPostScriptName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests/ChangeLog
PerformanceTests/Layout/font-fallback-font-family.html [new file with mode: 0644]
PerformanceTests/Layout/resources/font-fallback-font-family.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Source/WebCore/platform/spi/cocoa/CoreTextSPI.h