diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 18:05:42 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 18:05:42 +0300 |
commit | e5256a65788ec9ee9cedfd07af7b77148df69dd6 (patch) | |
tree | 380d8c65c8e66c4ad549d2f5cba99a14bbe61339 /src | |
parent | a769a0105e6f3f614a7fd7f4138885dfb19b8d46 (diff) | |
download | jquery-e5256a65788ec9ee9cedfd07af7b77148df69dd6.tar.gz jquery-e5256a65788ec9ee9cedfd07af7b77148df69dd6.zip |
Revert "Effects: Reintroduce use of requestAnimationFrame"
This reverts commit 06a45406966ee8cde31c4f128d7ee68d727880c1.
Diffstat (limited to 'src')
-rw-r--r-- | src/effects.js | 23 |
1 files changed, 1 insertions, 22 deletions
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 ); } }; |