Bug 181013 - Refactor user-installed font setting for clarity
Summary: Refactor user-installed font setting for clarity
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-19 17:10 PST by Myles C. Maxfield
Modified: 2017-12-19 19:26 PST (History)
2 users (show)

See Also:


Attachments
Patch (35.56 KB, patch)
2017-12-19 17:19 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (34.50 KB, patch)
2017-12-19 17:25 PST, Myles C. Maxfield
simon.fraser: review+
simon.fraser: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-12-19 17:10:58 PST
Refactor user-installed font setting for clarity
Comment 1 Myles C. Maxfield 2017-12-19 17:19:26 PST
Created attachment 329858 [details]
Patch
Comment 2 Myles C. Maxfield 2017-12-19 17:25:20 PST
Created attachment 329859 [details]
Patch
Comment 3 Simon Fraser (smfr) 2017-12-19 17:30:18 PST
Comment on attachment 329858 [details]
Patch

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

> Source/WebCore/platform/graphics/FontDescription.h:188
> +    unsigned m_shouldAllowUserInstalledFonts : 1; // If this description is allowed to match a user-installed font

The comment should mention the name of the enum.

> Source/WebCore/platform/text/TextFlags.h:367
> +    Yes,
> +    No

Maybe better to flip these so that No is 0 in case this gets cast to a bool context.

> Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:118
> -@property (nonatomic, setter=_setShouldDisallowUserInstalledFonts:) BOOL _shouldDisallowUserInstalledFonts WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> +@property (nonatomic, setter=_setShouldAllowUserInstalledFonts:) BOOL _shouldAllowUserInstalledFonts WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));

I presume no-one is using this yet?
Comment 4 Simon Fraser (smfr) 2017-12-19 17:31:07 PST
Comment on attachment 329859 [details]
Patch

Please see my comments on the previous patch.
Comment 5 Myles C. Maxfield 2017-12-19 18:50:14 PST
Comment on attachment 329858 [details]
Patch

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

>> Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:118
>> +@property (nonatomic, setter=_setShouldAllowUserInstalledFonts:) BOOL _shouldAllowUserInstalledFonts WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> 
> I presume no-one is using this yet?

Correct.
Comment 6 Myles C. Maxfield 2017-12-19 19:24:22 PST
Committed r226172: <https://trac.webkit.org/changeset/226172>
Comment 7 Radar WebKit Bug Importer 2017-12-19 19:26:56 PST
<rdar://problem/36147318>