( elem, props, opts )
| 7550 | } |
| 7551 | |
| 7552 | function defaultPrefilter( elem, props, opts ) { |
| 7553 | /* jshint validthis: true */ |
| 7554 | var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, |
| 7555 | anim = this, |
| 7556 | orig = {}, |
| 7557 | style = elem.style, |
| 7558 | hidden = elem.nodeType && isHidden( elem ), |
| 7559 | dataShow = jQuery._data( elem, "fxshow" ); |
| 7560 | |
| 7561 | // handle queue: false promises |
| 7562 | if ( !opts.queue ) { |
| 7563 | hooks = jQuery._queueHooks( elem, "fx" ); |
| 7564 | if ( hooks.unqueued == null ) { |
| 7565 | hooks.unqueued = 0; |
| 7566 | oldfire = hooks.empty.fire; |
| 7567 | hooks.empty.fire = function() { |
| 7568 | if ( !hooks.unqueued ) { |
| 7569 | oldfire(); |
| 7570 | } |
| 7571 | }; |
| 7572 | } |
| 7573 | hooks.unqueued++; |
| 7574 | |
| 7575 | anim.always( function() { |
| 7576 | |
| 7577 | // doing this makes sure that the complete handler will be called |
| 7578 | // before this completes |
| 7579 | anim.always( function() { |
| 7580 | hooks.unqueued--; |
| 7581 | if ( !jQuery.queue( elem, "fx" ).length ) { |
| 7582 | hooks.empty.fire(); |
| 7583 | } |
| 7584 | } ); |
| 7585 | } ); |
| 7586 | } |
| 7587 | |
| 7588 | // height/width overflow pass |
| 7589 | if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { |
| 7590 | |
| 7591 | // Make sure that nothing sneaks out |
| 7592 | // Record all 3 overflow attributes because IE does not |
| 7593 | // change the overflow attribute when overflowX and |
| 7594 | // overflowY are set to the same value |
| 7595 | opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; |
| 7596 | |
| 7597 | // Set display property to inline-block for height/width |
| 7598 | // animations on inline elements that are having width/height animated |
| 7599 | display = jQuery.css( elem, "display" ); |
| 7600 | |
| 7601 | // Test default display if display is currently "none" |
| 7602 | checkDisplay = display === "none" ? |
| 7603 | jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; |
| 7604 | |
| 7605 | if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { |
| 7606 | |
| 7607 | // inline-level elements accept inline-block; |
| 7608 | // block-level elements need to be inline with layout |
| 7609 | if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) { |
nothing calls this directly
no test coverage detected