Bug 133382 - Support -apple-system-font on OS X
Summary: Support -apple-system-font on OS X
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-05-29 11:52 PDT by Myles C. Maxfield
Modified: 2014-05-30 14:01 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.56 KB, patch)
2014-05-29 11:56 PDT, 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 2014-05-29 11:52:19 PDT
Support -apple-system-font on OS X
Comment 1 Myles C. Maxfield 2014-05-29 11:56:40 PDT
Created attachment 232257 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-05-29 12:00:41 PDT
Comment on attachment 232257 [details]
Patch

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

> LayoutTests/ChangeLog:11
> +        * platform/mac/fast/text/apple-system-font-expected.html: Added.
> +        * platform/mac/fast/text/apple-system-font.html: Added.

I think this ref test is bogus. You should extend the existing -webkit-system-font test.
Comment 3 mitz 2014-05-29 16:54:12 PDT
Comment on attachment 232257 [details]
Patch

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

> Source/WebCore/platform/mac/WebFontCache.mm:164
> -    if ([desiredFamily compare:@"-webkit-system-font" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
> +    if ([desiredFamily compare:@"-webkit-system-font" options:NSCaseInsensitiveSearch] == NSOrderedSame
> +        || [desiredFamily compare:@"-apple-system-font" options:NSCaseInsensitiveSearch] == NSOrderedSame) {

Can we use stringIsCaseInsensitiveEqualToString() here instead?
Comment 4 Myles C. Maxfield 2014-05-29 17:06:14 PDT
http://trac.webkit.org/changeset/169474

Will use stringIsCaseInsensitiveEqualToString in a follow-up patch
Comment 5 Radar WebKit Bug Importer 2014-05-30 11:29:15 PDT
<rdar://problem/17080463>
Comment 6 Myles C. Maxfield 2014-05-30 14:01:25 PDT
Addressed Mitz' comments in http://trac.webkit.org/changeset/169492