]> source.dussan.org Git - jquery.git/commitdiff
Remove requestAnimationFrame support. Fixes #9381.
authortimmywil <timmywillisn@gmail.com>
Tue, 16 Aug 2011 15:21:01 +0000 (11:21 -0400)
committertimmywil <timmywillisn@gmail.com>
Tue, 16 Aug 2011 15:21:53 +0000 (11:21 -0400)
src/effects.js

index a7529a0f2b4e69adbb3d1b3fc2b33e1106d5be3a..8009171514359ea79561db29bf5a62ff9b158566 100644 (file)
@@ -13,10 +13,7 @@ var elemdisplay = {},
                // opacity animations
                [ "opacity" ]
        ],
-       fxNow,
-       requestAnimationFrame = window.webkitRequestAnimationFrame ||
-               window.mozRequestAnimationFrame ||
-               window.oRequestAnimationFrame;
+       fxNow;
 
 jQuery.fn.extend({
        show: function( speed, easing, callback ) {
@@ -392,8 +389,7 @@ jQuery.fx.prototype = {
        // Start an animation from one number to another
        custom: function( from, to, unit ) {
                var self = this,
-                       fx = jQuery.fx,
-                       raf;
+                       fx = jQuery.fx;
 
                this.startTime = fxNow || createFxNow();
                this.start = from;
@@ -409,20 +405,7 @@ jQuery.fx.prototype = {
                t.elem = this.elem;
 
                if ( t() && jQuery.timers.push(t) && !timerId ) {
-                       // Use requestAnimationFrame instead of setInterval if available
-                       if ( requestAnimationFrame ) {
-                               timerId = true;
-                               raf = function() {
-                                       // When timerId gets set to null at any point, this stops
-                                       if ( timerId ) {
-                                               requestAnimationFrame( raf );
-                                               fx.tick();
-                                       }
-                               };
-                               requestAnimationFrame( raf );
-                       } else {
-                               timerId = setInterval( fx.tick, fx.interval );
-                       }
+                       timerId = setInterval( fx.tick, fx.interval );
                }
        },