Title: [191540] trunk
- Revision
- 191540
- Author
- [email protected]
- Date
- 2015-10-24 18:33:02 -0700 (Sat, 24 Oct 2015)
Log Message
REGRESSION (r187121): Delayed instantaneous animations not honouring ' forwards' fill-mode
https://bugs.webkit.org/show_bug.cgi?id=150326
Reviewed by Darin Adler.
Source/WebCore:
With a zero-duration, delayed fill-forwards animation, we'd end up trying
to interpolate between the last and first keyframes, and picking the first
because AnimationBase::progress() had a special case for zero duration. Removing
this check fixes the bug.
Test: animations/fill-mode-forwards-zero-duration.html
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::progress):
LayoutTests:
Test with a zero-duration, delayed fill-forwards animation.
* animations/fill-mode-forwards-zero-duration-expected.txt: Added.
* animations/fill-mode-forwards-zero-duration.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (191539 => 191540)
--- trunk/LayoutTests/ChangeLog 2015-10-25 00:51:08 UTC (rev 191539)
+++ trunk/LayoutTests/ChangeLog 2015-10-25 01:33:02 UTC (rev 191540)
@@ -1,3 +1,15 @@
+2015-10-24 Simon Fraser <[email protected]>
+
+ REGRESSION (r187121): Delayed instantaneous animations not honouring ' forwards' fill-mode
+ https://bugs.webkit.org/show_bug.cgi?id=150326
+
+ Reviewed by Darin Adler.
+
+ Test with a zero-duration, delayed fill-forwards animation.
+
+ * animations/fill-mode-forwards-zero-duration-expected.txt: Added.
+ * animations/fill-mode-forwards-zero-duration.html: Added.
+
2015-10-23 Chris Dumez <[email protected]>
RadioNodeList should be exposed on Window
Added: trunk/LayoutTests/animations/fill-mode-forwards-zero-duration-expected.txt (0 => 191540)
--- trunk/LayoutTests/animations/fill-mode-forwards-zero-duration-expected.txt (rev 0)
+++ trunk/LayoutTests/animations/fill-mode-forwards-zero-duration-expected.txt 2015-10-25 01:33:02 UTC (rev 191540)
@@ -0,0 +1,4 @@
+Fill-forwards state should be the last keyframe state, even with a zero-duration animation.
+
+PASS - "left" property for "box1" element at 1s saw something close to: 100
+
Added: trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html (0 => 191540)
--- trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html (rev 0)
+++ trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html 2015-10-25 01:33:02 UTC (rev 191540)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ #box1 {
+ position: relative;
+ left: 10px;
+ top: 10px;
+ height: 100px;
+ width: 100px;
+ background-color: blue;
+ animation-fill-mode: forwards;
+ animation: anim1 0 2s linear;
+ }
+ @keyframes anim1 {
+ from { left: 400px; }
+ 25% { left: 0px; }
+ 51% { left: 250px; }
+ to { left: 100px; }
+ }
+ </style>
+ <script src=""
+ <script>
+
+ const expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["anim1", 1, "box1", "left", 100, 2],
+ ];
+
+ runAnimationTest(expectedValues);
+ </script>
+</head>
+<body>
+<p>Fill-forwards state should be the last keyframe state, even with a zero-duration animation.</p>
+<div id="box1"></div>
+<div id="result"></div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (191539 => 191540)
--- trunk/Source/WebCore/ChangeLog 2015-10-25 00:51:08 UTC (rev 191539)
+++ trunk/Source/WebCore/ChangeLog 2015-10-25 01:33:02 UTC (rev 191540)
@@ -1,3 +1,20 @@
+2015-10-24 Simon Fraser <[email protected]>
+
+ REGRESSION (r187121): Delayed instantaneous animations not honouring ' forwards' fill-mode
+ https://bugs.webkit.org/show_bug.cgi?id=150326
+
+ Reviewed by Darin Adler.
+
+ With a zero-duration, delayed fill-forwards animation, we'd end up trying
+ to interpolate between the last and first keyframes, and picking the first
+ because AnimationBase::progress() had a special case for zero duration. Removing
+ this check fixes the bug.
+
+ Test: animations/fill-mode-forwards-zero-duration.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::progress):
+
2015-10-23 Chris Dumez <[email protected]>
RadioNodeList should be exposed on Window
Modified: trunk/Source/WebCore/page/animation/AnimationBase.cpp (191539 => 191540)
--- trunk/Source/WebCore/page/animation/AnimationBase.cpp 2015-10-25 00:51:08 UTC (rev 191539)
+++ trunk/Source/WebCore/page/animation/AnimationBase.cpp 2015-10-25 01:33:02 UTC (rev 191540)
@@ -459,7 +459,7 @@
break;
}
}
-
+
void AnimationBase::fireAnimationEventsIfNeeded()
{
if (!m_compositeAnimation)
@@ -621,8 +621,8 @@
if (preActive())
return 0;
- if (postActive() || !m_animation->duration())
- return 1.0;
+ if (postActive())
+ return 1;
double elapsedTime = getElapsedTime();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes