[webkit-changes] [WebKit/WebKit] 47204e: CSS linear() function not easing as expected
Antoine Quint
noreply at github.com
Wed Jan 3 09:23:26 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 47204e7f6a588ff2f68bab665144c279e2c9354a
https://github.com/WebKit/WebKit/commit/47204e7f6a588ff2f68bab665144c279e2c9354a
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-01-03 (Wed, 03 Jan 2024)
Changed paths:
A LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-7-expected.txt
A LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-7.html
M Source/WebCore/animation/KeyframeEffect.cpp
Log Message:
-----------
CSS linear() function not easing as expected
https://bugs.webkit.org/show_bug.cgi?id=266848
rdar://120290721
Reviewed by Simon Fraser.
While we attempted to make the use of `linear()` with accelerated properties work in 269594 at main,
we neglected to test the case of a CSS Animation with a default `animation-timing-function` set
to a `linear()` easing.
We now address this by adding a dedicated test and ensuring the logic added in KeyframeEffect
is correct. Indeed, there were two issues:
1. we would only check for the absence of a timing function on a keyframe or an explicit `linear()`
value if `m_someKeyframesUseStepsTimingFunction` was `false`. Since that variable is `false` by default
and only ever `true` in case `steps()` values are involved, we would never hit the codepath required
to deal with `linear()` values.
2. due to some shoddy copy-pasting, we actually never set `m_someKeyframesUseLinearTimingFunctionWithPoints`!
We now correctly `m_someKeyframesUseLinearTimingFunctionWithPoints` such that the mechanisms
introduced in 269594 at main work as expected.
* LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-7-expected.txt: Added.
* LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-7.html: Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::computeSomeKeyframesUseStepsOrLinearTimingFunctionWithPoints):
Canonical link: https://commits.webkit.org/272613@main
More information about the webkit-changes
mailing list