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