Bug 215687

Summary: [Cocoa] CTFontIsSystemUIFont() is faster than CTFontDescriptorIsSystemUIFont()/CTFontCopyFontDescriptor()
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, darin, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
darin: review+
Patch for committing
none
Patch for committing none

Description Myles C. Maxfield 2020-08-19 21:40:03 PDT
[Cocoa] CTFontIsSystemUIFont() is faster than CTFontDescriptorIsSystemUIFont()/CTFontCopyFontDescriptor()
Comment 1 Myles C. Maxfield 2020-08-19 21:42:24 PDT
Created attachment 406915 [details]
Patch
Comment 2 Myles C. Maxfield 2020-08-19 21:44:37 PDT
<rdar://problem/59295639>
Comment 3 Myles C. Maxfield 2020-08-19 21:54:56 PDT
Created attachment 406916 [details]
Patch
Comment 4 Darin Adler 2020-08-19 22:02:24 PDT
Comment on attachment 406916 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=406916&action=review

> Source/WTF/wtf/PlatformUse.h:310
> +#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 110000)
> +#define USE_CTFONTISSYSTEMUIFONT 1
> +#endif

Is this a USE or a HAVE?

> Source/WebCore/platform/graphics/FontPlatformData.h:132
> +    static bool isSystemFont(CTFontRef);

Does this benefit from being a member function? Why not just a "free function" in this file?
Comment 5 Myles C. Maxfield 2020-09-05 01:40:42 PDT
Created attachment 408075 [details]
Patch for committing
Comment 6 Myles C. Maxfield 2020-09-05 01:49:35 PDT
Created attachment 408076 [details]
Patch for committing
Comment 7 EWS 2020-09-05 11:21:26 PDT
Committed r266667: <https://trac.webkit.org/changeset/266667>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408076 [details].