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

Side by Side Diff: polymer_0.5.4/bower_components/web-animations-js/src/tick.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, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 Google Inc. All rights reserved. 1 // Copyright 2014 Google Inc. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 tick(t); 43 tick(t);
44 applyPendingEffects(); 44 applyPendingEffects();
45 } 45 }
46 46
47 function comparePlayers(leftPlayer, rightPlayer) { 47 function comparePlayers(leftPlayer, rightPlayer) {
48 return leftPlayer._sequenceNumber - rightPlayer._sequenceNumber; 48 return leftPlayer._sequenceNumber - rightPlayer._sequenceNumber;
49 } 49 }
50 50
51 function InternalTimeline() { 51 function InternalTimeline() {
52 this._players = []; 52 this._players = [];
53 this.currentTime = window.performance ? performance.now() : 0; 53 // Android 4.3 browser has window.performance, but not window.performance.no w
54 this.currentTime = window.performance && performance.now ? performance.now() : 0;
54 }; 55 };
55 56
56 InternalTimeline.prototype = { 57 InternalTimeline.prototype = {
57 _play: function(source) { 58 _play: function(source) {
58 source._timing = shared.normalizeTimingInput(source.timing); 59 source._timing = shared.normalizeTimingInput(source.timing);
59 var player = new scope.Player(source); 60 var player = new scope.Player(source);
60 player._idle = false; 61 player._idle = false;
61 player._timeline = this; 62 player._timeline = this;
62 this._players.push(player); 63 this._players.push(player);
63 scope.restart(); 64 scope.restart();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 138
138 if (WEB_ANIMATIONS_TESTING) { 139 if (WEB_ANIMATIONS_TESTING) {
139 testing.tick = processRafCallbacks; 140 testing.tick = processRafCallbacks;
140 testing.isTicking = function() { return ticking; }; 141 testing.isTicking = function() { return ticking; };
141 testing.setTicking = function(newVal) { ticking = newVal; }; 142 testing.setTicking = function(newVal) { ticking = newVal; };
142 } 143 }
143 144
144 var timeline = new InternalTimeline(); 145 var timeline = new InternalTimeline();
145 scope.timeline = timeline; 146 scope.timeline = timeline;
146 147
147 })(webAnimationsShared, webAnimationsMinifill, webAnimationsTesting); 148 })(webAnimationsShared, webAnimations1, webAnimationsTesting);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698