Title: [251657] trunk
- Revision
- 251657
- Author
- grao...@webkit.org
- Date
- 2019-10-28 09:59:08 -0700 (Mon, 28 Oct 2019)
Log Message
[Web Animations] The easing property for a CSSTransition effect is always "linear"
https://bugs.webkit.org/show_bug.cgi?id=203476
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark WPT progressions.
* web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt:
Source/WebCore:
While we correctly used the timing function set on the Animation object created while parsing a CSS Transition
for blending, we wouldn't set the timing function on the CSSTransition's AnimationEffect and it would not be
reflected correctly through the JS API. This also means that we shouldn't perform per-keyframe blending for CSS
Transitions.
* animation/CSSTransition.cpp:
(WebCore::CSSTransition::setTimingProperties):
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (251656 => 251657)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-10-28 16:25:17 UTC (rev 251656)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-10-28 16:59:08 UTC (rev 251657)
@@ -1,3 +1,14 @@
+2019-10-27 Antoine Quint <grao...@apple.com>
+
+ [Web Animations] The easing property for a CSSTransition effect is always "linear"
+ https://bugs.webkit.org/show_bug.cgi?id=203476
+
+ Reviewed by Dean Jackson.
+
+ Mark WPT progressions.
+
+ * web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt:
+
2019-10-28 Simon Fraser <simon.fra...@apple.com>
Can't change @font-face descriptors from fontFaceRule.style.setProperty()
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt (251656 => 251657)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt 2019-10-28 16:25:17 UTC (rev 251656)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative-expected.txt 2019-10-28 16:59:08 UTC (rev 251657)
@@ -8,8 +8,8 @@
PASS iterations of a new transition
PASS duration of a new transition
PASS direction of a new transition
-FAIL easing of a new transition assert_equals: Initial value of easing expected "ease" but got "linear"
-FAIL non-default easing of a new transition assert_equals: Initial value of easing expected "steps(4)" but got "linear"
+PASS easing of a new transition
+PASS non-default easing of a new transition
PASS endTime of a new transition
PASS activeDuration of a new transition
PASS localTime of a new transition
Modified: trunk/Source/WebCore/ChangeLog (251656 => 251657)
--- trunk/Source/WebCore/ChangeLog 2019-10-28 16:25:17 UTC (rev 251656)
+++ trunk/Source/WebCore/ChangeLog 2019-10-28 16:59:08 UTC (rev 251657)
@@ -1,3 +1,20 @@
+2019-10-27 Antoine Quint <grao...@apple.com>
+
+ [Web Animations] The easing property for a CSSTransition effect is always "linear"
+ https://bugs.webkit.org/show_bug.cgi?id=203476
+
+ Reviewed by Dean Jackson.
+
+ While we correctly used the timing function set on the Animation object created while parsing a CSS Transition
+ for blending, we wouldn't set the timing function on the CSSTransition's AnimationEffect and it would not be
+ reflected correctly through the JS API. This also means that we shouldn't perform per-keyframe blending for CSS
+ Transitions.
+
+ * animation/CSSTransition.cpp:
+ (WebCore::CSSTransition::setTimingProperties):
+ * animation/KeyframeEffect.cpp:
+ (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
+
2019-10-28 Simon Fraser <simon.fra...@apple.com>
Can't change @font-face descriptors from fontFaceRule.style.setProperty()
Modified: trunk/Source/WebCore/animation/CSSTransition.cpp (251656 => 251657)
--- trunk/Source/WebCore/animation/CSSTransition.cpp 2019-10-28 16:25:17 UTC (rev 251656)
+++ trunk/Source/WebCore/animation/CSSTransition.cpp 2019-10-28 16:59:08 UTC (rev 251657)
@@ -72,6 +72,7 @@
animationEffect->setFill(FillMode::Backwards);
animationEffect->setDelay(delay);
animationEffect->setIterationDuration(duration);
+ animationEffect->setTimingFunction(backingAnimation().timingFunction());
unsuspendEffectInvalidation();
}
Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (251656 => 251657)
--- trunk/Source/WebCore/animation/KeyframeEffect.cpp 2019-10-28 16:25:17 UTC (rev 251656)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp 2019-10-28 16:59:08 UTC (rev 251657)
@@ -1065,6 +1065,7 @@
return;
bool isCSSAnimation = is<CSSAnimation>(animation());
+ bool isCSSTransition = is<CSSTransition>(animation());
for (auto cssPropertyId : m_blendingKeyframes.properties()) {
// 1. If iteration progress is unresolved abort this procedure.
@@ -1183,8 +1184,10 @@
// 17. Let transformed distance be the result of evaluating the timing function associated with the first keyframe in interval endpoints
// passing interval distance as the input progress.
+ // We do not need to do this for CSS Transitions since the timing function is applied to the AnimationEffect as a whole and thus
+ // iterationProgress is already transformed.
auto transformedDistance = intervalDistance;
- if (startKeyframeIndex) {
+ if (!isCSSTransition && startKeyframeIndex) {
if (auto duration = iterationDuration()) {
auto rangeDuration = (endOffset - startOffset) * duration.seconds();
if (auto* timingFunction = timingFunctionForKeyframeAtIndex(startKeyframeIndex.value()))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes