|
22 | 22 | rfxtypes = /^(?:toggle|show|hide)$/, |
23 | 23 | rrun = /queueHooks$/; |
24 | 24 |
|
25 | | -function raf() { |
26 | | - if ( timerId ) { |
27 | | - window.requestAnimationFrame( raf ); |
28 | | - jQuery.fx.tick(); |
29 | | - } |
30 | | -} |
31 | | - |
32 | | -// Will get false negative for old browsers which is okay |
33 | | -function isDocumentHidden() { |
34 | | - return "hidden" in document && document.hidden; |
35 | | -} |
36 | | - |
37 | 25 | // Animations created synchronously will run synchronously |
38 | 26 | function createFxNow() { |
39 | 27 | window.setTimeout( function() { |
@@ -447,10 +435,6 @@ jQuery.fn.extend( { |
447 | 435 | .end().animate( { opacity: to }, speed, easing, callback ); |
448 | 436 | }, |
449 | 437 | animate: function( prop, speed, easing, callback ) { |
450 | | - if ( isDocumentHidden() ) { |
451 | | - return this; |
452 | | - } |
453 | | - |
454 | 438 | var empty = jQuery.isEmptyObject( prop ), |
455 | 439 | optall = jQuery.speed( speed, easing, callback ), |
456 | 440 | doAnimation = function() { |
@@ -623,12 +607,7 @@ jQuery.fx.interval = 13; |
623 | 607 |
|
624 | 608 | jQuery.fx.start = function() { |
625 | 609 | if ( !timerId ) { |
626 | | - if ( window.requestAnimationFrame ) { |
627 | | - timerId = true; |
628 | | - window.requestAnimationFrame( raf ); |
629 | | - } else { |
630 | | - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); |
631 | | - } |
| 610 | + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); |
632 | 611 | } |
633 | 612 | }; |
634 | 613 |
|
|
0 commit comments