Bug 182860 - [Cocoa] Make system-ui obey the user-installed-font policy
Summary: [Cocoa] Make system-ui obey the user-installed-font policy
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: 2018-02-15 21:36 PST by Myles C. Maxfield
Modified: 2018-02-27 19:37 PST (History)
9 users (show)

See Also:


Attachments
Patch (25.48 KB, patch)
2018-02-15 21:45 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-sierra (2.35 MB, application/zip)
2018-02-15 22:47 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.71 MB, application/zip)
2018-02-15 22:51 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews113 for mac-sierra (3.08 MB, application/zip)
2018-02-15 23:23 PST, EWS Watchlist
no flags Details
Patch (37.46 KB, patch)
2018-02-18 15:01 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.56 MB, application/zip)
2018-02-18 16:07 PST, EWS Watchlist
no flags Details
Patch (37.85 KB, patch)
2018-02-19 21:25 PST, Myles C. Maxfield
koivisto: review+
Details | Formatted Diff | Diff
Patch for committing (37.48 KB, patch)
2018-02-20 23:41 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch for committing (37.49 KB, patch)
2018-02-21 01:12 PST, Myles C. Maxfield
no flags 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 2018-02-15 21:36:09 PST
[Cocoa] Make system-ui obey the user-installed-font policy
Comment 1 Myles C. Maxfield 2018-02-15 21:45:17 PST
Created attachment 333999 [details]
Patch
Comment 2 EWS Watchlist 2018-02-15 21:46:07 PST
Attachment 333999 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:21:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Myles C. Maxfield 2018-02-15 21:46:33 PST
<rdar://problem/36158249>
Comment 4 EWS Watchlist 2018-02-15 22:47:45 PST
Comment on attachment 333999 [details]
Patch

Attachment 333999 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/6530089

New failing tests:
media/media-document-audio-repaint.html
media/video-no-audio.html
media/video-volume-slider.html
media/controls-styling.html
media/video-display-toggle.html
fast/text/system-font-features.html
media/controls-after-reload.html
Comment 5 EWS Watchlist 2018-02-15 22:47:46 PST
Created attachment 334007 [details]
Archive of layout-test-results from ews100 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2018-02-15 22:51:16 PST
Comment on attachment 333999 [details]
Patch

Attachment 333999 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6530096

New failing tests:
media/video-display-toggle.html
fast/text/system-ui-chinese-bold-fallback.html
media/video-no-audio.html
fast/text/system-font-features.html
media/video-volume-slider.html
Comment 7 EWS Watchlist 2018-02-15 22:51:18 PST
Created attachment 334008 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2018-02-15 23:23:24 PST
Comment on attachment 333999 [details]
Patch

Attachment 333999 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/6530138

New failing tests:
media/media-document-audio-repaint.html
media/video-no-audio.html
media/video-volume-slider.html
media/controls-styling.html
media/video-display-toggle.html
fast/text/system-font-features.html
media/controls-after-reload.html
Comment 9 EWS Watchlist 2018-02-15 23:23:26 PST
Created attachment 334009 [details]
Archive of layout-test-results from ews113 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 10 Myles C. Maxfield 2018-02-18 15:01:38 PST
Created attachment 334127 [details]
Patch
Comment 11 EWS Watchlist 2018-02-18 16:07:20 PST
Comment on attachment 334127 [details]
Patch

Attachment 334127 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6565867

New failing tests:
fast/text/system-ui-chinese-bold-fallback.html
Comment 12 EWS Watchlist 2018-02-18 16:07:21 PST
Created attachment 334128 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 13 Myles C. Maxfield 2018-02-19 21:25:36 PST
Created attachment 334240 [details]
Patch
Comment 14 Antti Koivisto 2018-02-20 16:46:41 PST
Comment on attachment 334240 [details]
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?
Comment 15 Myles C. Maxfield 2018-02-20 23:41:38 PST
Created attachment 334341 [details]
Patch for committing
Comment 16 Myles C. Maxfield 2018-02-21 01:12:08 PST
Created attachment 334346 [details]
Patch for committing
Comment 17 WebKit Commit Bot 2018-02-21 09:34:50 PST
Comment on attachment 334346 [details]
Patch for committing

Clearing flags on attachment: 334346

Committed r228877: <https://trac.webkit.org/changeset/228877>