Changeset 291008 in webkit


Ignore:
Timestamp:
Mar 8, 2022 1:25:12 PM (4 months ago)
Author:
graouts@webkit.org
Message:

[web-animations] color-interpolation should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237610

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

Since the input for the strings used in comparison for the WPT tests is using toLowerCase(),
we need to also use toLowerCase() for the output, so that "linearRGB" and "linearrgb" are
both correct values for "color-interpolation" values.

  • 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:
  • web-platform-tests/web-animations/animation-model/animation-types/property-list.js:

Source/WebCore:

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::colorInterpolation const):
(WebCore::RenderStyle::setColorInterpolation):

Location:
trunk
Files:
8 edited

Legend:

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

    r290998 r291008  
     12022-03-08  Antoine Quint  <graouts@webkit.org>
     2
     3        [web-animations] color-interpolation should support discrete animation
     4        https://bugs.webkit.org/show_bug.cgi?id=237610
     5
     6        Reviewed by Tim Nguyen.
     7
     8        Since the input for the strings used in comparison for the WPT tests is using toLowerCase(),
     9        we need to also use toLowerCase() for the output, so that "linearRGB" and "linearrgb" are
     10        both correct values for "color-interpolation" values.
     11
     12        * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
     13        * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
     14        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
     15        * web-platform-tests/web-animations/animation-model/animation-types/property-list.js:
     16
    1172022-03-08  Sihui Liu  <sihui_liu@apple.com>
    218
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt

    r290571 r291008  
    131131PASS color supports animating as color of rgba()
    132132PASS color supports animating as color of hsla()
     133PASS color-interpolation (type: discrete) has testAccumulation function
     134PASS color-interpolation: "auto" onto "linearrgb"
     135PASS color-interpolation: "linearrgb" onto "auto"
    133136PASS column-count (type: positiveInteger) has testAccumulation function
    134137PASS column-count: positive integer
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt

    r290571 r291008  
    131131PASS color supports animating as color of rgba()
    132132PASS color supports animating as color of hsla()
     133PASS color-interpolation (type: discrete) has testAddition function
     134PASS color-interpolation: "auto" onto "linearrgb"
     135PASS color-interpolation: "linearrgb" onto "auto"
    133136PASS column-count (type: positiveInteger) has testAddition function
    134137PASS column-count: positive integer
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt

    r287909 r291008  
    158158PASS color supports animating as color of rgba()
    159159PASS color supports animating as color of hsla()
     160PASS color-interpolation (type: discrete) has testInterpolation function
     161PASS color-interpolation uses discrete animation when animating between "linearrgb" and "auto" with linear easing
     162PASS color-interpolation uses discrete animation when animating between "linearrgb" and "auto" with effect easing
     163PASS color-interpolation uses discrete animation when animating between "linearrgb" and "auto" with keyframe easing
    160164PASS column-count (type: positiveInteger) has testInterpolation function
    161165PASS column-count supports animating as a positive integer
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-list.js

    r287924 r291008  
    14251425  for (const testSample of testSamples) {
    14261426    animation.currentTime = testSample.time;
    1427     assert_equals(getComputedStyle(target, pseudoType)[idlName],
     1427    assert_equals(getComputedStyle(target, pseudoType)[idlName].toLowerCase(),
    14281428                  testSample.expected,
    14291429                  `The value should be ${testSample.expected}` +
  • trunk/Source/WebCore/ChangeLog

    r291003 r291008  
     12022-03-08  Antoine Quint  <graouts@webkit.org>
     2
     3        [web-animations] color-interpolation should support discrete animation
     4        https://bugs.webkit.org/show_bug.cgi?id=237610
     5
     6        Reviewed by Tim Nguyen.
     7
     8        * animation/CSSPropertyAnimation.cpp:
     9        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
     10        * rendering/style/RenderStyle.h:
     11        (WebCore::RenderStyle::colorInterpolation const):
     12        (WebCore::RenderStyle::setColorInterpolation):
     13
    1142022-03-08  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r290898 r291008  
    28082808        new PropertyWrapperContent,
    28092809        new OffsetRotatePropertyWrapper(CSSPropertyOffsetRotate, &RenderStyle::offsetRotate, &RenderStyle::setOffsetRotate),
    2810         new DiscretePropertyWrapper<TextDecorationSkipInk>(CSSPropertyTextDecorationSkipInk, &RenderStyle::textDecorationSkipInk, &RenderStyle::setTextDecorationSkipInk)
     2810        new DiscretePropertyWrapper<TextDecorationSkipInk>(CSSPropertyTextDecorationSkipInk, &RenderStyle::textDecorationSkipInk, &RenderStyle::setTextDecorationSkipInk),
     2811        new DiscretePropertyWrapper<ColorInterpolation>(CSSPropertyColorInterpolation, &RenderStyle::colorInterpolation, &RenderStyle::setColorInterpolation)
    28112812    };
    28122813    const unsigned animatableLonghandPropertiesCount = WTF_ARRAY_LENGTH(animatableLonghandPropertyWrappers);
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r290867 r291008  
    14221422    const SVGRenderStyle& svgStyle() const { return m_svgStyle; }
    14231423    SVGRenderStyle& accessSVGStyle() { return m_svgStyle.access(); }
     1424
     1425    ColorInterpolation colorInterpolation() const { return svgStyle().colorInterpolation(); }
     1426    void setColorInterpolation(ColorInterpolation colorInterpolation) { accessSVGStyle().setColorInterpolation(colorInterpolation); }
    14241427
    14251428    SVGPaintType fillPaintType() const { return svgStyle().fillPaintType(); }
Note: See TracChangeset for help on using the changeset viewer.