summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/web-animations-api
diff options
context:
space:
mode:
authordstockwell@chromium.org <dstockwell@chromium.org>2014-09-03 04:53:22 +0000
committerdstockwell@chromium.org <dstockwell@chromium.org>2014-09-03 04:53:22 +0000
commitbba320012a95fd56260033f31e37eba0759329e4 (patch)
treebb016d9e624825b16853b6b07e03fa41f48cd615 /third_party/WebKit/LayoutTests/web-animations-api
parentfa8137d2fbd70ceb1be03e05c9d80b8f45b34188 (diff)
downloadchromium_src-bba320012a95fd56260033f31e37eba0759329e4.zip
chromium_src-bba320012a95fd56260033f31e37eba0759329e4.tar.gz
chromium_src-bba320012a95fd56260033f31e37eba0759329e4.tar.bz2
Web Animations: Resolve Player start and current times asynchronously
As the Web Animations API cannot synchronously influence animations executed by the chromium compositor, the times at which operations like play() and pause() take effect cannot be accurately determined independently by the main thread. Instead, such operations are asynchronous in the Web Animations model. For example, playing an animation which is idle will place the animation into a pending[1] state where the start time is unresolved[2]. Asynchronously the start time will be resolved and the player's timing model updated. The player may always be forced into a known state by setting these values explicitly. In this patch, unresolved start and current times are represented by NaN, this will soon change to either null or another sentinel value. Note: This API remains guarded behind the WebAnimationsAPI runtime flag. [1] Subsequent patches will expose this state via AnimationPlayer.playState. [2] http://dev.w3.org/fxtf/web-animations/#dfn-unresolved BUG=396372 Review URL: https://codereview.chromium.org/400543003 git-svn-id: svn://svn.chromium.org/blink/trunk@181280 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/web-animations-api')
-rw-r--r--third_party/WebKit/LayoutTests/web-animations-api/player-cancel-finishes.html6
-rw-r--r--third_party/WebKit/LayoutTests/web-animations-api/timeline-updates-players.html1
2 files changed, 4 insertions, 3 deletions
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/player-cancel-finishes.html b/third_party/WebKit/LayoutTests/web-animations-api/player-cancel-finishes.html
index 2d46956..0c4d11a 100644
--- a/third_party/WebKit/LayoutTests/web-animations-api/player-cancel-finishes.html
+++ b/third_party/WebKit/LayoutTests/web-animations-api/player-cancel-finishes.html
@@ -65,7 +65,7 @@ function animate() {
var timing = {
fill: 'none',
iterations: Infinity,
- duration: 99
+ duration: 9001
};
playerTop = document.getElementById('top').animate(keyframes, timing);
@@ -81,10 +81,10 @@ function animate() {
playerBottom.onfinish = onFinishBottom;
// Finish event does not fire while currentTime is negative.
- playerBottom.currentTime = -99;
+ playerBottom.currentTime = -9001;
playerBottom.source = null;
- playerTop.currentTime = -0.1;
+ playerTop.currentTime = 100;
playerTop.source = null;
if (window.testRunner) {
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/timeline-updates-players.html b/third_party/WebKit/LayoutTests/web-animations-api/timeline-updates-players.html
index 14a9622..f3b9e42 100644
--- a/third_party/WebKit/LayoutTests/web-animations-api/timeline-updates-players.html
+++ b/third_party/WebKit/LayoutTests/web-animations-api/timeline-updates-players.html
@@ -22,6 +22,7 @@ test(function() {
test(function() {
var player = document.timeline.play(animation);
+ assert_equals(getComputedStyle(element).left, '0px');
var source = player.source
player.source = null;
assert_equals(getComputedStyle(element).left, 'auto');