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

Unified Diff: Source/web/resources/calendarPicker.js

Issue 209003012: Use requestAnimationFrame (without prefix) in calendar picker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/resources/calendarPicker.js
diff --git a/Source/web/resources/calendarPicker.js b/Source/web/resources/calendarPicker.js
index d811070c6fcccc815eb92dbee6d12413bd287cfe..e1c01770dc99f637ad72646dd1b3a31f75c35b78 100644
--- a/Source/web/resources/calendarPicker.js
+++ b/Source/web/resources/calendarPicker.js
@@ -919,7 +919,7 @@ AnimationManager.prototype._startAnimation = function() {
if (this._isRunning)
return;
this._isRunning = true;
- window.webkitRequestAnimationFrame(this._animationFrameCallbackBound);
+ window.requestAnimationFrame(this._animationFrameCallbackBound);
};
AnimationManager.prototype._stopAnimation = function() {
@@ -960,7 +960,7 @@ AnimationManager.prototype._animationFrameCallback = function(now) {
}
this.dispatchEvent(AnimationManager.EventTypeAnimationFrameWillFinish);
if (this._isRunning)
- window.webkitRequestAnimationFrame(this._animationFrameCallbackBound);
+ window.requestAnimationFrame(this._animationFrameCallbackBound);
};
/**
@@ -1044,7 +1044,7 @@ Animator.prototype.isRunning = function() {
};
Animator.prototype.start = function() {
- this._lastStepTime = Date.now();
+ this._lastStepTime = performance.now();
this._isRunning = true;
AnimationManager.shared.add(this);
};
@@ -1208,7 +1208,7 @@ FlingGestureAnimator.prototype._timeAtVelocity = function(v) {
};
FlingGestureAnimator.prototype.start = function() {
- this._lastStepTime = Date.now();
+ this._lastStepTime = performance.now();
Animator.prototype.start.call(this);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698