Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291114 => 291115)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-10 16:47:04 UTC (rev 291115)
@@ -1,5 +1,17 @@
2022-03-10 Antoine Quint <grao...@webkit.org>
+ [web-animations] font-variant-position should support discrete animation
+ https://bugs.webkit.org/show_bug.cgi?id=237671
+
+ Reviewed by Myles C. Maxfield.
+
+ * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
+
+2022-03-10 Antoine Quint <grao...@webkit.org>
+
[web-animations] font-variant-ligatures should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237667
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt (291114 => 291115)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt 2022-03-10 16:47:04 UTC (rev 291115)
@@ -16,7 +16,7 @@
PASS Animation of font-variant-east-asian in ::marker
PASS Animation of font-variant-ligatures in ::marker
FAIL Animation of font-variant-numeric in ::marker assert_equals: expected "slashed-zero" but got "tabular-nums"
-FAIL Animation of font-variant-position in ::marker assert_equals: expected "sub" but got "normal"
+PASS Animation of font-variant-position in ::marker
PASS Animation of font-weight in ::marker
PASS Animation of line-height in ::marker
PASS Animation of white-space in ::marker
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt (291114 => 291115)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt 2022-03-10 16:47:04 UTC (rev 291115)
@@ -263,6 +263,9 @@
PASS font-variant-ligatures (type: discrete) has testAccumulation function
PASS font-variant-ligatures: "no-common-ligatures" onto "common-ligatures"
PASS font-variant-ligatures: "common-ligatures" onto "no-common-ligatures"
+PASS font-variant-position (type: discrete) has testAccumulation function
+PASS font-variant-position: "super" onto "sub"
+PASS font-variant-position: "sub" onto "super"
PASS font-variation-settings (type: fontVariationSettings) has testAccumulation function
FAIL font-variation-settings with composite type accumulate assert_equals: The value should be "wght" 2.2 at 250ms expected "\"wght\" 2.2" but got "\"wght\" 1.2"
PASS font-variation-settings (type: discrete) has testAccumulation function
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt (291114 => 291115)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt 2022-03-10 16:47:04 UTC (rev 291115)
@@ -263,6 +263,9 @@
PASS font-variant-ligatures (type: discrete) has testAddition function
PASS font-variant-ligatures: "no-common-ligatures" onto "common-ligatures"
PASS font-variant-ligatures: "common-ligatures" onto "no-common-ligatures"
+PASS font-variant-position (type: discrete) has testAddition function
+PASS font-variant-position: "super" onto "sub"
+PASS font-variant-position: "sub" onto "super"
PASS font-variation-settings (type: fontVariationSettings) has testAddition function
FAIL font-variation-settings with composite type add assert_equals: The value should be "wght" 2.2 at 250ms expected "\"wght\" 2.2" but got "\"wght\" 1.2"
PASS font-variation-settings (type: discrete) has testAddition function
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt (291114 => 291115)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt 2022-03-10 16:47:04 UTC (rev 291115)
@@ -321,6 +321,10 @@
PASS font-variant-ligatures uses discrete animation when animating between "common-ligatures" and "no-common-ligatures" with linear easing
PASS font-variant-ligatures uses discrete animation when animating between "common-ligatures" and "no-common-ligatures" with effect easing
PASS font-variant-ligatures uses discrete animation when animating between "common-ligatures" and "no-common-ligatures" with keyframe easing
+PASS font-variant-position (type: discrete) has testInterpolation function
+PASS font-variant-position uses discrete animation when animating between "sub" and "super" with linear easing
+PASS font-variant-position uses discrete animation when animating between "sub" and "super" with effect easing
+PASS font-variant-position uses discrete animation when animating between "sub" and "super" with keyframe easing
PASS font-variation-settings (type: fontVariationSettings) has testInterpolation function
PASS font-variation-settings supports animation as float
PASS font-variation-settings supports animation as float with multiple tags
Modified: trunk/Source/WebCore/ChangeLog (291114 => 291115)
--- trunk/Source/WebCore/ChangeLog 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/Source/WebCore/ChangeLog 2022-03-10 16:47:04 UTC (rev 291115)
@@ -1,5 +1,23 @@
2022-03-10 Antoine Quint <grao...@webkit.org>
+ [web-animations] font-variant-position should support discrete animation
+ https://bugs.webkit.org/show_bug.cgi?id=237671
+
+ Reviewed by Myles C. Maxfield.
+
+ * animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * platform/text/TextFlags.cpp:
+ (WebCore::operator<<):
+ * platform/text/TextFlags.h:
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::setFontVariantAlternates):
+ (WebCore::RenderStyle::setFontVariantPosition):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::fontVariantPosition const):
+
+2022-03-10 Antoine Quint <grao...@webkit.org>
+
[web-animations] font-variant-ligatures should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237667
Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (291114 => 291115)
--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-10 16:47:04 UTC (rev 291115)
@@ -3014,7 +3014,8 @@
new DiscretePropertyWrapper<FontSynthesis>(CSSPropertyFontSynthesis, &RenderStyle::fontSynthesis, &RenderStyle::setFontSynthesis),
new DiscretePropertyWrapper<FontVariantAlternates>(CSSPropertyFontVariantAlternates, &RenderStyle::fontVariantAlternates, &RenderStyle::setFontVariantAlternates),
new FontVariantEastAsianWrapper,
- new FontVariantLigaturesWrapper
+ new FontVariantLigaturesWrapper,
+ new DiscretePropertyWrapper<FontVariantPosition>(CSSPropertyFontVariantPosition, &RenderStyle::fontVariantPosition, &RenderStyle::setFontVariantPosition)
};
const unsigned animatableLonghandPropertiesCount = WTF_ARRAY_LENGTH(animatableLonghandPropertyWrappers);
Modified: trunk/Source/WebCore/platform/text/TextFlags.cpp (291114 => 291115)
--- trunk/Source/WebCore/platform/text/TextFlags.cpp 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/Source/WebCore/platform/text/TextFlags.cpp 2022-03-10 16:47:04 UTC (rev 291115)
@@ -49,4 +49,14 @@
return ts;
}
+WTF::TextStream& operator<<(TextStream& ts, FontVariantPosition position)
+{
+ switch (position) {
+ case FontVariantPosition::Normal: ts << "normal"; break;
+ case FontVariantPosition::Subscript: ts << "subscript"; break;
+ case FontVariantPosition::Superscript: ts << "superscript"; break;
+ }
+ return ts;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/text/TextFlags.h (291114 => 291115)
--- trunk/Source/WebCore/platform/text/TextFlags.h 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/Source/WebCore/platform/text/TextFlags.h 2022-03-10 16:47:04 UTC (rev 291115)
@@ -86,6 +86,8 @@
enum class FontVariantLigatures : uint8_t { Normal, Yes, No };
enum class FontVariantPosition : uint8_t { Normal, Subscript, Superscript };
+WTF::TextStream& operator<<(WTF::TextStream&, FontVariantPosition);
+
enum class FontVariantCaps : uint8_t {
Normal,
Small,
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (291114 => 291115)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2022-03-10 16:47:04 UTC (rev 291115)
@@ -2074,6 +2074,16 @@
fontCascade().update(currentFontSelector);
}
+void RenderStyle::setFontVariantPosition(FontVariantPosition value)
+{
+ FontSelector* currentFontSelector = fontCascade().fontSelector();
+ auto description = fontDescription();
+ description.setVariantPosition(value);
+
+ setFontDescription(WTFMove(description));
+ fontCascade().update(currentFontSelector);
+}
+
LayoutBoxExtent RenderStyle::shadowExtent(const ShadowData* shadow)
{
LayoutUnit top;
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (291114 => 291115)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2022-03-10 16:43:08 UTC (rev 291114)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2022-03-10 16:47:04 UTC (rev 291115)
@@ -375,6 +375,7 @@
RefCountedFixedVector<AtomString>& fontFamilies() const { return fontDescription().families(); }
FontSynthesis fontSynthesis() const { return fontDescription().fontSynthesis(); }
FontVariantAlternates fontVariantAlternates() const { return fontDescription().variantAlternates(); }
+ FontVariantPosition fontVariantPosition() const { return fontDescription().variantPosition(); }
const Length& textIndent() const { return m_rareInheritedData->indent; }
TextAlignMode textAlign() const { return static_cast<TextAlignMode>(m_inheritedFlags.textAlign); }
@@ -1001,6 +1002,7 @@
void setFontFamilies(RefCountedFixedVector<AtomString>&);
void setFontSynthesis(FontSynthesis);
void setFontVariantAlternates(FontVariantAlternates);
+ void setFontVariantPosition(FontVariantPosition);
void setColor(const Color&);
void setTextIndent(Length&& length) { SET_VAR(m_rareInheritedData, indent, WTFMove(length)); }