diff --git a/src/components/progressCircular/js/progressCircularDirective.js b/src/components/progressCircular/js/progressCircularDirective.js index 566d32009af..9422d6801f6 100644 --- a/src/components/progressCircular/js/progressCircularDirective.js +++ b/src/components/progressCircular/js/progressCircularDirective.js @@ -53,8 +53,15 @@ function MdProgressCircularDirective($window, $mdProgressCircular, $mdTheming, // Note that this shouldn't use use $$rAF, because it can cause an infinite loop // in any tests that call $animate.flush. - var rAF = $window.requestAnimationFrame || angular.noop; - var cAF = $window.cancelAnimationFrame || angular.noop; + var rAF = $window.requestAnimationFrame || + $window.webkitRequestAnimationFrame || + angular.noop; + + var cAF = $window.cancelAnimationFrame || + $window.webkitCancelAnimationFrame || + $window.webkitCancelRequestAnimationFrame || + angular.noop; + var DEGREE_IN_RADIANS = $window.Math.PI / 180; var MODE_DETERMINATE = 'determinate'; var MODE_INDETERMINATE = 'indeterminate'; @@ -208,8 +215,8 @@ function MdProgressCircularDirective($window, $mdProgressCircular, $mdTheming, if (animateTo === animateFrom) { path.attr('d', getSvgArc(animateTo, diameter, pathDiameter, rotation)); } else { - lastDrawFrame = rAF(function animation(now) { - var currentTime = $window.Math.max(0, $window.Math.min((now || $mdUtil.now()) - startTime, animationDuration)); + lastDrawFrame = rAF(function animation() { + var currentTime = $window.Math.max(0, $window.Math.min($mdUtil.now() - startTime, animationDuration)); path.attr('d', getSvgArc( ease(currentTime, animateFrom, changeInValue, animationDuration),