( elem, props, opts )
| 6512 | } |
| 6513 | |
| 6514 | function defaultPrefilter( elem, props, opts ) { |
| 6515 | /* jshint validthis: true */ |
| 6516 | var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, |
| 6517 | anim = this, |
| 6518 | orig = {}, |
| 6519 | style = elem.style, |
| 6520 | hidden = elem.nodeType && isHidden( elem ), |
| 6521 | dataShow = dataPriv.get( elem, "fxshow" ); |
| 6522 | |
| 6523 | // Handle queue: false promises |
| 6524 | if ( !opts.queue ) { |
| 6525 | hooks = jQuery._queueHooks( elem, "fx" ); |
| 6526 | if ( hooks.unqueued == null ) { |
| 6527 | hooks.unqueued = 0; |
| 6528 | oldfire = hooks.empty.fire; |
| 6529 | hooks.empty.fire = function() { |
| 6530 | if ( !hooks.unqueued ) { |
| 6531 | oldfire(); |
| 6532 | } |
| 6533 | }; |
| 6534 | } |
| 6535 | hooks.unqueued++; |
| 6536 | |
| 6537 | anim.always( function() { |
| 6538 | |
| 6539 | // Ensure the complete handler is called before this completes |
| 6540 | anim.always( function() { |
| 6541 | hooks.unqueued--; |
| 6542 | if ( !jQuery.queue( elem, "fx" ).length ) { |
| 6543 | hooks.empty.fire(); |
| 6544 | } |
| 6545 | } ); |
| 6546 | } ); |
| 6547 | } |
| 6548 | |
| 6549 | // Height/width overflow pass |
| 6550 | if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { |
| 6551 | |
| 6552 | // Make sure that nothing sneaks out |
| 6553 | // Record all 3 overflow attributes because IE9-10 do not |
| 6554 | // change the overflow attribute when overflowX and |
| 6555 | // overflowY are set to the same value |
| 6556 | opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; |
| 6557 | |
| 6558 | // Set display property to inline-block for height/width |
| 6559 | // animations on inline elements that are having width/height animated |
| 6560 | display = jQuery.css( elem, "display" ); |
| 6561 | |
| 6562 | // Test default display if display is currently "none" |
| 6563 | checkDisplay = display === "none" ? |
| 6564 | dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; |
| 6565 | |
| 6566 | if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { |
| 6567 | style.display = "inline-block"; |
| 6568 | } |
| 6569 | } |
| 6570 | |
| 6571 | if ( opts.overflow ) { |
nothing calls this directly
no test coverage detected