Changeset 276639 in webkit


Ignore:
Timestamp:
Apr 27, 2021 8:29:29 AM (15 months ago)
Author:
graouts@webkit.org
Message:

Fix animation of the visibility CSS property between "hidden" and "collapse"
https://bugs.webkit.org/show_bug.cgi?id=225103

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark 1 WPT progression.

  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

The Web Animations spec details the special behavior when animating the visibility property
in https://drafts.csswg.org/web-animations-1/#animating-visibility. There it says that when
interpolating between non-visible values, we should use discrete interpolation formula.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

Location:
trunk
Files:
4 edited

Legend:

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

    r276638 r276639  
     12021-04-27  Antoine Quint  <graouts@webkit.org>
     2
     3        Fix animation of the visibility CSS property between "hidden" and "collapse"
     4        https://bugs.webkit.org/show_bug.cgi?id=225103
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Mark 1 WPT progression.
     9
     10        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
     11
    1122021-04-27  Antoine Quint  <graouts@webkit.org>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt

    r276638 r276639  
    226226PASS visibility uses visibility animation when animating from "visible" to "hidden"
    227227PASS visibility uses visibility animation when animating from "hidden" to "visible"
    228 FAIL visibility uses visibility animation when animating from "hidden" to "collapse" assert_equals: The value should be hidden at 0ms expected "hidden" but got "collapse"
     228PASS visibility uses visibility animation when animating from "hidden" to "collapse"
    229229PASS visibility uses visibility animation when animating from "visible" to "hidden" with easeInOutBack easing
    230230PASS white-space (type: discrete) has testInterpolation function
  • trunk/Source/WebCore/ChangeLog

    r276638 r276639  
     12021-04-27  Antoine Quint  <graouts@webkit.org>
     2
     3        Fix animation of the visibility CSS property between "hidden" and "collapse"
     4        https://bugs.webkit.org/show_bug.cgi?id=225103
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The Web Animations spec details the special behavior when animating the visibility property
     9        in https://drafts.csswg.org/web-animations-1/#animating-visibility. There it says that when
     10        interpolating between non-visible values, we should use discrete interpolation formula.
     11
     12        * animation/CSSPropertyAnimation.cpp:
     13        (WebCore::blendFunc):
     14
    1152021-04-27  Antoine Quint  <graouts@webkit.org>
    216
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r276638 r276639  
    380380static inline Visibility blendFunc(Visibility from, Visibility to, const CSSPropertyBlendingContext& context)
    381381{
     382    if (from != Visibility::Visible && to != Visibility::Visible)
     383        return context.progress < 0.5 ? from : to;
     384
    382385    // Any non-zero result means we consider the object to be visible. Only at 0 do we consider the object to be
    383386    // invisible. The invisible value we use (Visibility::Hidden vs. Visibility::Collapse) depends on the specified from/to values.
Note: See TracChangeset for help on using the changeset viewer.