Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: polymer_0.5.4/bower_components/web-animations-js/src/animation-constructor.js

Issue 895523005: Added Polymer 0.5.4 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: polymer_0.5.4/bower_components/web-animations-js/src/animation-constructor.js
diff --git a/polymer_0.5.0/bower_components/web-animations-js/src/animation-constructor.js b/polymer_0.5.4/bower_components/web-animations-js/src/animation-constructor.js
similarity index 86%
copy from polymer_0.5.0/bower_components/web-animations-js/src/animation-constructor.js
copy to polymer_0.5.4/bower_components/web-animations-js/src/animation-constructor.js
index 334e690fd5e87fdd66d129515967595bb6ebb567..b4933078e64bc45ced343fae5d12ceb852888435 100644
--- a/polymer_0.5.0/bower_components/web-animations-js/src/animation-constructor.js
+++ b/polymer_0.5.4/bower_components/web-animations-js/src/animation-constructor.js
@@ -28,8 +28,12 @@
scope.Animation = function(target, effect, timingInput) {
this.target = target;
- // TODO: Make modifications to specified update the underlying player
+
+ // TODO: Store a clone, not the same instance.
+ this._timingInput = timingInput;
this._timing = shared.normalizeTimingInput(timingInput);
+
+ // TODO: Make modifications to timing update the underlying player
this.timing = shared.makeTiming(timingInput);
// TODO: Make this a live object - will need to separate normalization of
// keyframes into a shared module.
@@ -47,14 +51,14 @@
return scope.timeline.play(new scope.Animation(this, effect, timing));
};
- var nullTarget = document.createElement('div');
+ var nullTarget = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
scope.newUnderlyingPlayerForAnimation = function(animation) {
var target = animation.target || nullTarget;
var effect = animation._effect;
if (typeof effect == 'function') {
effect = [];
}
- return originalElementAnimate.apply(target, [effect, animation.timing]);
+ return originalElementAnimate.apply(target, [effect, animation._timingInput]);
};
scope.bindPlayerForAnimation = function(player) {
@@ -94,7 +98,7 @@
// TODO: Call into this less frequently.
scope.Player.prototype._updateChildren = function() {
- if (this.startTime === null || !this.source || !this._isGroup)
+ if (this.paused || !this.source || !this._isGroup)
return;
var offset = this.source._timing.delay;
for (var i = 0; i < this.source.children.length; i++) {
@@ -103,14 +107,19 @@
if (i >= this._childPlayers.length) {
childPlayer = window.document.timeline.play(child);
- child.player = this.source.player;
this._childPlayers.push(childPlayer);
} else {
childPlayer = this._childPlayers[i];
}
+ child.player = this.source.player;
if (childPlayer.startTime != this.startTime + offset) {
- childPlayer.startTime = this.startTime + offset;
+ if (this.startTime === null) {
+ childPlayer.currentTime = this.source.player.currentTime - offset;
+ childPlayer._startTime = null;
+ } else {
+ childPlayer.startTime = this.startTime + offset;
+ }
childPlayer._updateChildren();
}
@@ -132,4 +141,4 @@
scope.groupChildDuration = groupChildDuration;
-}(webAnimationsShared, webAnimationsMaxifill, webAnimationsTesting));
+}(webAnimationsShared, webAnimationsNext, webAnimationsTesting));

Powered by Google App Engine
This is Rietveld 408576698