Bug 160186 - [iOS] SF-Heavy is inaccessible by web content
Summary: [iOS] SF-Heavy is inaccessible by web content
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: 2016-07-25 22:34 PDT by Myles C. Maxfield
Modified: 2016-07-26 23:22 PDT (History)
1 user (show)

See Also:


Attachments
Patch (9.05 KB, patch)
2016-07-25 22:40 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (752.01 KB, application/zip)
2016-07-25 23:39 PDT, Build Bot
no flags Details
Patch (9.71 KB, patch)
2016-07-26 11:31 PDT, Myles C. Maxfield
dino: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (641.53 KB, application/zip)
2016-07-26 12:29 PDT, Build Bot
no flags Details
Patch for committing (10.99 KB, patch)
2016-07-26 21:58 PDT, 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 2016-07-25 22:34:54 PDT
[iOS] SF-Heavy is inaccessible by web content
Comment 1 Myles C. Maxfield 2016-07-25 22:39:33 PDT
<rdar://problem/27434423>
Comment 2 Myles C. Maxfield 2016-07-25 22:40:26 PDT
Created attachment 284564 [details]
Patch
Comment 3 Build Bot 2016-07-25 23:39:08 PDT
Comment on attachment 284564 [details]
Patch

Attachment 284564 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1754784

New failing tests:
fast/text/weighted-italicized-system-font.html
Comment 4 Build Bot 2016-07-25 23:39:10 PDT
Created attachment 284566 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
Comment 5 Myles C. Maxfield 2016-07-26 11:31:54 PDT
Created attachment 284608 [details]
Patch
Comment 6 Simon Fraser (smfr) 2016-07-26 12:02:52 PDT
Comment on attachment 284608 [details]
Patch

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

> Source/WebCore/platform/graphics/ios/FontCacheIOS.mm:142
> +        // so we should investigate the result <rdar://problem/14449340>:

Remove the comment

> Source/WebCore/platform/graphics/ios/FontCacheIOS.mm:155
> +static RetainPtr<CFDictionaryRef> systemFontModificationAttributes(FontWeight weight, bool italic)

I wonder if this entire function would be easier to write using Obj-C literals.

> Source/WebCore/platform/graphics/ios/FontCacheIOS.mm:160
> +    RetainPtr<CFNumberRef> weightNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, ctWeights + weight));

Would prefer explicit array indexing. What's to prevent things changing and allowing out of range indexing?

> Source/WebCore/platform/graphics/ios/FontCacheIOS.mm:164
> +    RetainPtr<CFNumberRef> trueNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &one));

@1!
Comment 7 Dean Jackson 2016-07-26 12:08:59 PDT
Comment on attachment 284608 [details]
Patch

Do we still have the issue where the normal weight of the system font doesn't match what you'd get if you ask for 400? Can you test that?
Comment 8 Build Bot 2016-07-26 12:29:42 PDT
Comment on attachment 284608 [details]
Patch

Attachment 284608 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1757519

New failing tests:
fast/text/system-font-weight.html
Comment 9 Build Bot 2016-07-26 12:29:45 PDT
Created attachment 284616 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
Comment 10 Myles C. Maxfield 2016-07-26 21:58:00 PDT
Created attachment 284673 [details]
Patch for committing
Comment 11 Myles C. Maxfield 2016-07-26 22:11:09 PDT
Comment on attachment 284673 [details]
Patch for committing

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

> Source/WebCore/platform/graphics/ios/FontCacheIOS.mm:166
> +    return adoptNS(@{ static_cast<NSString *>(kCTFontTraitsAttribute) : traitsDictionary.get() });

This adoptNS is wrong.
Comment 12 Myles C. Maxfield 2016-07-26 23:22:07 PDT
Committed r203764: <http://trac.webkit.org/changeset/203764>