Variation fonts: Make sure that feature detection and preprocessor macros are right
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2017 17:40:21 +0000 (17:40 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2017 17:40:21 +0000 (17:40 +0000)
commitc0fe831d87012badb2f47d8d91e71bd2a0b53983
treea66f16676e0bf5a49710ff9536914cb0f60751ce
parentbacb0918c22d3fa532e0bea65d4ddf2669d7bc27
Variation fonts: Make sure that feature detection and preprocessor macros are right
https://bugs.webkit.org/show_bug.cgi?id=169518

Reviewed by Simon Fraser.

Source/WebCore:

When I added variable fonts support, I made all OSes parse the newly accepted values,
instead of just the OSes which support variable fonts.

Test: fast/text/font-variations-feature-detection.html

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontStretch):
(WebCore::consumeFontStyle):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::divisibleBy100):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):

LayoutTests:

Create platform-specific results for mac-elcapitan which doesn't support variation fonts.

* fast/text/font-variations-feature-detection-expected.html: Added.
* fast/text/font-variations-feature-detection.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
* platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt: Added.
* platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt: Added.
* platform/mac-elcapitan/fast/text/font-style-parse-expected.txt: Added.
* platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt: Added.
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/font-variations-feature-detection-expected.html [new file with mode: 0644]
LayoutTests/fast/text/font-variations-feature-detection.html [new file with mode: 0644]
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt
LayoutTests/platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-elcapitan/fast/text/font-style-parse-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSPropertyParser.cpp
Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp