-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-fonts] Implement
font-variant-emoji
CSS property
https://bugs.webkit.org/show_bug.cgi?id=246911 rdar://101722745 Reviewed by Myles C. Maxfield. This builds off existing code that Myles wrote in bug 259139 for platform support. font-variant-emoji: normal | text | emoji | unicode https://drafts.csswg.org/css-fonts-4/#font-variant-emoji-prop * LayoutTests/TestExpectations: * LayoutTests/fast/css/font-property-priority-expected.txt: * LayoutTests/fast/css/font-shorthand-expected.txt: * LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-shorthand-serialization-prevention-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-shorthand-subproperties-reset-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/inheritance-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-variant-emoji-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-variant-emoji-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-emoji-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-emoji.html: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/font-shorthand-serialization-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/editing/run/removeformat-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-list.js: * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * Source/WebCore/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * Source/WebCore/css/CSSPrimitiveValueMappings.h: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/css/ComputedStyleExtractor.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyInStyle const): * Source/WebCore/css/ShorthandSerializer.cpp: * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::consumeFontVariantShorthand): (WebCore::initialValueForLonghand): * Source/WebCore/platform/graphics/FontCascade.cpp: (WebCore::FontCascade::glyphDataForCharacter const): * Source/WebCore/platform/graphics/FontCascadeCache.h: (WebCore::FontDescriptionKey::makeFlagsKey): * Source/WebCore/platform/graphics/FontCascadeDescription.h: (WebCore::FontCascadeDescription::initialVariantEmoji): * Source/WebCore/platform/graphics/FontDescription.cpp: * Source/WebCore/platform/graphics/FontDescription.h: (WebCore::FontDescription::variantEmoji const): (WebCore::FontDescription::variantSettings const): (WebCore::FontDescription::setVariantEmoji): (WebCore::FontDescription::operator== const): (WebCore::FontDescription::encode const): (WebCore::FontDescription::decode): * Source/WebCore/platform/text/TextFlags.h: (WebCore::FontVariantSettings::FontVariantSettings): (WebCore::FontVariantSettings::isAllNormal const): (WebCore::FontVariantSettings::operator== const): Canonical link: https://commits.webkit.org/267540@main
- Loading branch information
Showing
38 changed files
with
161 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ted/w3c/web-platform-tests/css/css-fonts/parsing/font-variant-emoji-computed-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
FAIL Property font-variant-emoji value 'normal' assert_true: font-variant-emoji doesn't seem to be supported in the computed style expected true got false | ||
FAIL Property font-variant-emoji value 'text' assert_true: font-variant-emoji doesn't seem to be supported in the computed style expected true got false | ||
FAIL Property font-variant-emoji value 'emoji' assert_true: font-variant-emoji doesn't seem to be supported in the computed style expected true got false | ||
FAIL Property font-variant-emoji value 'unicode' assert_true: font-variant-emoji doesn't seem to be supported in the computed style expected true got false | ||
PASS Property font-variant-emoji value 'normal' | ||
PASS Property font-variant-emoji value 'text' | ||
PASS Property font-variant-emoji value 'emoji' | ||
PASS Property font-variant-emoji value 'unicode' | ||
|
8 changes: 4 additions & 4 deletions
8
...ported/w3c/web-platform-tests/css/css-fonts/parsing/font-variant-emoji-valid-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
FAIL e.style['font-variant-emoji'] = "normal" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['font-variant-emoji'] = "text" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['font-variant-emoji'] = "emoji" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
FAIL e.style['font-variant-emoji'] = "unicode" should set the property value assert_not_equals: property should be set got disallowed value "" | ||
PASS e.style['font-variant-emoji'] = "normal" should set the property value | ||
PASS e.style['font-variant-emoji'] = "text" should set the property value | ||
PASS e.style['font-variant-emoji'] = "emoji" should set the property value | ||
PASS e.style['font-variant-emoji'] = "unicode" should set the property value | ||
|
17 changes: 9 additions & 8 deletions
17
...rm-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-emoji-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Tests/imported/w3c/web-platform-tests/css/cssom/font-shorthand-serialization-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL The font shorthand should be serialized just like any other shorthand. assert_equals: expected "font: 10px / 1 Ahem;" but got "font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: 1; font-family: Ahem; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;" | ||
FAIL The font shorthand should be serialized just like any other shorthand. assert_equals: expected "font: 10px / 1 Ahem;" but got "font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 10px; line-height: 1; font-family: Ahem; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;" | ||
|
Oops, something went wrong.