Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 268a017af767eade0ec58b3d1ce5965fa3136220
      
https://github.com/WebKit/WebKit/commit/268a017af767eade0ec58b3d1ce5965fa3136220
  Author: Antoine Quint <grao...@webkit.org>
  Date:   2024-06-30 (Sun, 30 Jun 2024)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-not-canceling.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-not-canceling.tentative.html
    M Source/WebCore/style/Styleable.cpp

  Log Message:
  -----------
  [css-transitions] `display` transition to `none` does not work on Chrome for 
Developers blog
https://bugs.webkit.org/show_bug.cgi?id=275994

Reviewed by Tim Nguyen.

Historically, setting `display: none` on an element would cancel any running 
transition. However,
with the addition of `transition-behavior: allow-discrete` and the fact 
`display` supports discrete
animation, setting `display: none` if that value is being transitioned should 
not cancel running
transitions.

On top of that, after canceling running transitions, we'd bail out of 
considering any further transition,
so we would fail to transition the `display` value itself.

We now correctly handle this case by checking in 
`Styleable::updateCSSTransitions()` whether setting
`display: none` will yield a transition before canceling running transitions 
and bailing out of that
method.

This was not covered by existing WPT tests, as noted in 
https://github.com/web-platform-tests/wpt/issues/46753,
so we're adding a new WPT test that checks that we do not cancel running 
transitions when setting
`display: none` when `display` is getting transitioned.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-not-canceling.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/CSSTransition-not-canceling.tentative.html:
 Added.
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::updateCSSTransitions const):

Canonical link: https://commits.webkit.org/280512@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to