Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 50450e8c417a9b25ff80bc6e2bc76e9f238fe475
https://github.com/WebKit/WebKit/commit/50450e8c417a9b25ff80bc6e2bc76e9f238fe475
Author: Antoine Quint <[email protected]>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/translation-animation-on-important-property-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/translation-animation-on-important-property.html
A
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-4-expected.txt
A
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-4.html
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/KeyframeEffectStack.cpp
M Source/WebCore/animation/KeyframeEffectStack.h
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
[web-animations] WPT test
css/css-animations/translation-animation-on-important-property.html is a failure
https://bugs.webkit.org/show_bug.cgi?id=252481
Reviewed by Antti Koivisto.
WPT.fyi reports we are failing the recently added
css/css-animations/translation-animation-on-important-property.html.
This test fails because it is animating an accelerated property, in this case
"transform", but also setting an
!important style for it, checking that the !important value wins over the
animated value. We fail to account for the
value set by the !important style when running accelerated animations.
To address this, we add a new method
KeyframeEffectStack::acceleratedPropertiesOverriddenByCascade() called by
Style::TreeResolver::createAnimatedElementUpdate() with the animated style
prior to further application of the
cascade and after the cascade has been fully applied. In this new method we see
which accelerated properties have
a different value between the two styles which informs whether an !important
style – or any style with higher
importance than animated style in the cascade - overrides the value set by
animations.
We store this list of properties and inform all effects in the stack when this
list changes. Then, an effect can determine
whether the presence of such a property prevents it from running accelerated
and, using the existing system to interrupt
and resume accelerated animations based on whether other effects in the stack
can or cannot be accelerated, will toggle
its accelerated running state.
Since the WPT test this patch fixes does not check whether animations can be
interrupted and resumed dynamically
by the presence of an overriding static property, we add such a test.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/translation-animation-on-important-property-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/translation-animation-on-important-property.html:
Added.
*
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-4-expected.txt:
Added.
*
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-4.html:
Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::canBeAccelerated const):
(WebCore::KeyframeEffect::computeHasAcceleratedPropertyOverriddenByCascadeProperty):
(WebCore::KeyframeEffect::acceleratedPropertiesOverriddenByCascadeDidChange):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::didApplyCascade):
* Source/WebCore/animation/KeyframeEffectStack.h:
(WebCore::KeyframeEffectStack::acceleratedPropertiesOverriddenByCascade const):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
Canonical link: https://commits.webkit.org/260464@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes