REGRESSION(r218371): Reeder's default font is Times instead of San Francisco
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Jul 2017 23:29:07 +0000 (23:29 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Jul 2017 23:29:07 +0000 (23:29 +0000)
commit2b74be6de0016e80103b4392b7fb7b198818b475
tree0a56d8ebf04f2709d2a865f766fad80f762479a1
parent7b54d872a53fe75e5a29b8ccd78be2dc0d97324a
REGRESSION(r218371): Reeder's default font is Times instead of San Francisco
https://bugs.webkit.org/show_bug.cgi?id=173617
<rdar://problem/32969819>

Reviewed by Simon Fraser.

Source/WebCore:

On systems where USE_PLATFORM_SYSTEM_FALLBACK_LIST is set to true, the code in
platformFontWithFamilySpecialCase() is still used when @font-face blocks specify
src:local(system-ui), which made the assertion erroneously fire.

Unfortunately, our architecture is such that an @font-face block represents a
single entry in the font-family fallback list, which means it would be quite
difficult to make local(system-ui) in an @font-face block expand at the level
of the font cascade. So, this patch simply reverts to the previous behavior for
local(system-ui) (which doesn't include the entire Core Text cascade list).
This means that "font-family: system-ui" and "src: local(system-ui)" have
different behavior, which is undesirable, but architecturally difficult to
solve. I've added some FIXMEs to the code in the relevant places and filed
https://bugs.webkit.org/show_bug.cgi?id=174023.

Test: fast/text/font-face-local-system.html

* platform/graphics/cocoa/FontDescriptionCocoa.cpp:
(WebCore::FontCascadeDescription::effectiveFamilyAt):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::systemFontDescriptor):
(WebCore::platformFontWithFamilySpecialCase):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::platformFontWithFamilySpecialCase):

LayoutTests:

* fast/text/font-face-local-system-expected.html: Added.
* fast/text/font-face-local-system.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/font-face-local-system-expected.html [new file with mode: 0644]
LayoutTests/fast/text/font-face-local-system.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
Source/WebCore/platform/graphics/ios/FontCacheIOS.mm
Source/WebCore/platform/graphics/mac/FontCacheMac.mm