From e5256a65788ec9ee9cedfd07af7b77148df69dd6 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Tue, 22 Dec 2015 18:05:42 +0300 Subject: Revert "Effects: Reintroduce use of requestAnimationFrame" This reverts commit 06a45406966ee8cde31c4f128d7ee68d727880c1. --- src/effects.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src') diff --git a/src/effects.js b/src/effects.js index 87dedc430..caaa7df64 100644 --- a/src/effects.js +++ b/src/effects.js @@ -22,18 +22,6 @@ var rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; -function raf() { - if ( timerId ) { - window.requestAnimationFrame( raf ); - jQuery.fx.tick(); - } -} - -// Will get false negative for old browsers which is okay -function isDocumentHidden() { - return "hidden" in document && document.hidden; -} - // Animations created synchronously will run synchronously function createFxNow() { window.setTimeout( function() { @@ -447,10 +435,6 @@ jQuery.fn.extend( { .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { - if ( isDocumentHidden() ) { - return this; - } - var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { @@ -623,12 +607,7 @@ jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( !timerId ) { - if ( window.requestAnimationFrame ) { - timerId = true; - window.requestAnimationFrame( raf ); - } else { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); } }; -- cgit v1.2.3