[webkit-reviews] review granted: [Bug 182860] [Cocoa] Make system-ui obey the user-installed-font policy : [Attachment 334240] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 20 16:46:41 PST 2018
Antti Koivisto <koivisto at iki.fi> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 182860: [Cocoa] Make system-ui obey the user-installed-font policy
https://bugs.webkit.org/show_bug.cgi?id=182860
Attachment 334240: Patch
https://bugs.webkit.org/attachment.cgi?id=334240&action=review
--- Comment #14 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 334240
--> https://bugs.webkit.org/attachment.cgi?id=334240
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=334240&action=review
r=me
> Source/WebCore/platform/graphics/mac/FontCacheMac.mm:122
> + auto attributes =
adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
> + addAttributesForInstalledFonts(attributes.get(),
allowUserInstalledFonts);
> + if (CFDictionaryGetCount(attributes.get())) {
> + auto modification =
adoptCF(CTFontDescriptorCreateWithAttributes(attributes.get()));
> + return adoptCF(CTFontCreateCopyWithAttributes(result.get(),
size, nullptr, modification.get()));
> + }
This stuff repeats several times. Could you factor it into a function?
More information about the webkit-reviews
mailing list