Changeset 291103 in webkit


Ignore:
Timestamp:
Mar 10, 2022 4:44:52 AM (4 months ago)
Author:
graouts@webkit.org
Message:

[web-animations] font-synthesis should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237650

Reviewed by Myles C. Maxfield.

LayoutTests/imported/w3c:

  • 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:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setFontFamilies):
(WebCore::RenderStyle::setFontSynthesis):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::fontSynthesis const):

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r291100 r291103  
     12022-03-10  Antoine Quint  <graouts@webkit.org>
     2
     3        [web-animations] font-synthesis should support discrete animation
     4        https://bugs.webkit.org/show_bug.cgi?id=237650
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:
     9        * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
     10        * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
     11        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
     12
    1132022-03-09  Antoine Quint  <graouts@webkit.org>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt

    r291040 r291103  
    88PASS Animation of font-stretch in ::marker
    99PASS Animation of font-style in ::marker
    10 FAIL Animation of font-synthesis in ::marker assert_equals: expected "none" but got "weight style small-caps"
     10PASS Animation of font-synthesis in ::marker
    1111FAIL Animation of font-synthesis-small-caps in ::marker assert_true: font-synthesis-small-caps doesn't seem to be supported in the computed style expected true got false
    1212FAIL Animation of font-synthesis-style in ::marker assert_true: font-synthesis-style doesn't seem to be supported in the computed style expected true got false
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt

    r291100 r291103  
    252252PASS font-kerning: "normal" onto "auto"
    253253PASS font-kerning: "auto" onto "normal"
     254PASS font-synthesis (type: discrete) has testAccumulation function
     255PASS font-synthesis: "weight style" onto "none"
     256PASS font-synthesis: "none" onto "weight style"
    254257PASS font-variation-settings (type: fontVariationSettings) has testAccumulation function
    255258FAIL 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"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt

    r291100 r291103  
    252252PASS font-kerning: "normal" onto "auto"
    253253PASS font-kerning: "auto" onto "normal"
     254PASS font-synthesis (type: discrete) has testAddition function
     255PASS font-synthesis: "weight style" onto "none"
     256PASS font-synthesis: "none" onto "weight style"
    254257PASS font-variation-settings (type: fontVariationSettings) has testAddition function
    255258FAIL 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"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt

    r291100 r291103  
    306306PASS font-kerning uses discrete animation when animating between "auto" and "normal" with effect easing
    307307PASS font-kerning uses discrete animation when animating between "auto" and "normal" with keyframe easing
     308PASS font-synthesis (type: discrete) has testInterpolation function
     309PASS font-synthesis uses discrete animation when animating between "none" and "weight style" with linear easing
     310PASS font-synthesis uses discrete animation when animating between "none" and "weight style" with effect easing
     311PASS font-synthesis uses discrete animation when animating between "none" and "weight style" with keyframe easing
    308312PASS font-variation-settings (type: fontVariationSettings) has testInterpolation function
    309313PASS font-variation-settings supports animation as float
  • trunk/Source/WebCore/ChangeLog

    r291101 r291103  
     12022-03-10  Antoine Quint  <graouts@webkit.org>
     2
     3        [web-animations] font-synthesis should support discrete animation
     4        https://bugs.webkit.org/show_bug.cgi?id=237650
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        * animation/CSSPropertyAnimation.cpp:
     9        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     10        * rendering/style/RenderStyle.cpp:
     11        (WebCore::RenderStyle::setFontFamilies):
     12        (WebCore::RenderStyle::setFontSynthesis):
     13        * rendering/style/RenderStyle.h:
     14        (WebCore::RenderStyle::fontSynthesis const):
     15
    1162022-03-10  Enrique Ocaña González  <eocanha@igalia.com>
    217
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r291100 r291103  
    29272927        new CounterWrapper(CSSPropertyCounterIncrement),
    29282928        new CounterWrapper(CSSPropertyCounterReset),
    2929         new DiscretePropertyWrapper<WindRule>(CSSPropertyFillRule, &RenderStyle::fillRule, &RenderStyle::setFillRule)
     2929        new DiscretePropertyWrapper<WindRule>(CSSPropertyFillRule, &RenderStyle::fillRule, &RenderStyle::setFillRule),
     2930        new DiscretePropertyWrapper<FontSynthesis>(CSSPropertyFontSynthesis, &RenderStyle::fontSynthesis, &RenderStyle::setFontSynthesis)
    29302931    };
    29312932    const unsigned animatableLonghandPropertiesCount = WTF_ARRAY_LENGTH(animatableLonghandPropertyWrappers);
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r291040 r291103  
    20502050    auto description = fontDescription();
    20512051    description.setFamilies(families);
     2052
     2053    setFontDescription(WTFMove(description));
     2054    fontCascade().update(currentFontSelector);
     2055}
     2056
     2057void RenderStyle::setFontSynthesis(FontSynthesis value)
     2058{
     2059    FontSelector* currentFontSelector = fontCascade().fontSelector();
     2060    auto description = fontDescription();
     2061    description.setFontSynthesis(value);
    20522062
    20532063    setFontDescription(WTFMove(description));
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r291100 r291103  
    374374    FontFeatureSettings fontFeatureSettings() const { return fontDescription().featureSettings(); }
    375375    RefCountedFixedVector<AtomString>& fontFamilies() const { return fontDescription().families(); }
     376    FontSynthesis fontSynthesis() const { return fontDescription().fontSynthesis(); }
    376377
    377378    const Length& textIndent() const { return m_rareInheritedData->indent; }
     
    998999    void setFontFeatureSettings(FontFeatureSettings);
    9991000    void setFontFamilies(RefCountedFixedVector<AtomString>&);
     1001    void setFontSynthesis(FontSynthesis);
    10001002
    10011003    void setColor(const Color&);
Note: See TracChangeset for help on using the changeset viewer.