Changeset 287826 in webkit


Ignore:
Timestamp:
Jan 9, 2022 11:51:57 AM (6 months ago)
Author:
graouts@webkit.org
Message:

Interpolation for the "filter" property fails with a single keyframe
https://bugs.webkit.org/show_bug.cgi?id=235019

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt:

Source/WebCore:

In the case of an animation with a single keyframe, the 0% or 100% value (or both) may
be implicit and the blending keyframes can have fewer than to entries. This would make
KeyframeEffect::checkForMatchingFilterFunctionLists() always store "false" values for
whether "filter" values in keyframes match and prevent any blending from happening.

In the case where we have fewer than 2 values, as long as the property is animated,
we return true.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::checkForMatchingFilterFunctionLists const):

Location:
trunk
Files:
4 edited

Legend:

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

    r287823 r287826  
     12022-01-09  Antoine Quint  <graouts@webkit.org>
     2
     3        Interpolation for the "filter" property fails with a single keyframe
     4        https://bugs.webkit.org/show_bug.cgi?id=235019
     5
     6        Reviewed by Dean Jackson.
     7
     8        Mark WPT progressions.
     9
     10        * web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt:
     11
    1122022-01-09  Ziran Sun  <zsun@igalia.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt

    r287813 r287826  
    6666PASS CSS Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1) should be [hue-rotate(20deg)]
    6767PASS CSS Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1.5) should be [hue-rotate(25deg)]
    68 FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (-0.5) should be [hue-rotate(5deg)] assert_equals: expected "hue - rotate ( 5deg ) " but got "hue - rotate ( 20deg ) "
    69 FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0) should be [hue-rotate(10deg)] assert_equals: expected "hue - rotate ( 10deg ) " but got "hue - rotate ( 20deg ) "
    70 FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.3) should be [hue-rotate(13deg)] assert_equals: expected "hue - rotate ( 13deg ) " but got "hue - rotate ( 20deg ) "
    71 FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.6) should be [hue-rotate(16deg)] assert_equals: expected "hue - rotate ( 16deg ) " but got "hue - rotate ( 20deg ) "
     68PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (-0.5) should be [hue-rotate(5deg)]
     69PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0) should be [hue-rotate(10deg)]
     70PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.3) should be [hue-rotate(13deg)]
     71PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.6) should be [hue-rotate(16deg)]
    7272PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1) should be [hue-rotate(20deg)]
    73 FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1.5) should be [hue-rotate(25deg)] assert_equals: expected "hue - rotate ( 25deg ) " but got "hue - rotate ( 20deg ) "
     73PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1.5) should be [hue-rotate(25deg)]
    7474PASS CSS Transitions: property <filter> from [initial] to [hue-rotate(20deg)] at (-0.5) should be [hue-rotate(-10deg)]
    7575PASS CSS Transitions: property <filter> from [initial] to [hue-rotate(20deg)] at (0) should be [hue-rotate(0deg)]
  • trunk/Source/WebCore/ChangeLog

    r287825 r287826  
     12022-01-09  Antoine Quint  <graouts@webkit.org>
     2
     3        Interpolation for the "filter" property fails with a single keyframe
     4        https://bugs.webkit.org/show_bug.cgi?id=235019
     5
     6        Reviewed by Dean Jackson.
     7
     8        In the case of an animation with a single keyframe, the 0% or 100% value (or both) may
     9        be implicit and the blending keyframes can have fewer than to entries. This would make
     10        KeyframeEffect::checkForMatchingFilterFunctionLists() always store "false" values for
     11        whether "filter" values in keyframes match and prevent any blending from happening.
     12
     13        In the case where we have fewer than 2 values, as long as the property is animated,
     14        we return true.
     15
     16        * animation/KeyframeEffect.cpp:
     17        (WebCore::KeyframeEffect::checkForMatchingFilterFunctionLists const):
     18
    1192022-01-09  Sam Weinig  <weinig@apple.com>
    220
  • trunk/Source/WebCore/animation/KeyframeEffect.cpp

    r287820 r287826  
    10491049bool KeyframeEffect::checkForMatchingFilterFunctionLists(CSSPropertyID propertyID, const std::function<const FilterOperations& (const RenderStyle&)>& filtersGetter) const
    10501050{
    1051     if (m_blendingKeyframes.size() < 2 || !m_blendingKeyframes.containsProperty(propertyID))
     1051    if (!m_blendingKeyframes.containsProperty(propertyID))
    10521052        return false;
     1053
     1054    if (m_blendingKeyframes.size() < 2)
     1055        return true;
    10531056
    10541057    // Empty filters match anything, so find the first non-empty entry as the reference.
Note: See TracChangeset for help on using the changeset viewer.