( elem, props, opts )
| 115 | } |
| 116 | |
| 117 | function defaultPrefilter( elem, props, opts ) { |
| 118 | /* jshint validthis: true */ |
| 119 | var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, |
| 120 | anim = this, |
| 121 | orig = {}, |
| 122 | style = elem.style, |
| 123 | hidden = elem.nodeType && isHidden( elem ), |
| 124 | dataShow = data_priv.get( elem, "fxshow" ); |
| 125 | |
| 126 | // Handle queue: false promises |
| 127 | if ( !opts.queue ) { |
| 128 | hooks = jQuery._queueHooks( elem, "fx" ); |
| 129 | if ( hooks.unqueued == null ) { |
| 130 | hooks.unqueued = 0; |
| 131 | oldfire = hooks.empty.fire; |
| 132 | hooks.empty.fire = function() { |
| 133 | if ( !hooks.unqueued ) { |
| 134 | oldfire(); |
| 135 | } |
| 136 | }; |
| 137 | } |
| 138 | hooks.unqueued++; |
| 139 | |
| 140 | anim.always(function() { |
| 141 | // Ensure the complete handler is called before this completes |
| 142 | anim.always(function() { |
| 143 | hooks.unqueued--; |
| 144 | if ( !jQuery.queue( elem, "fx" ).length ) { |
| 145 | hooks.empty.fire(); |
| 146 | } |
| 147 | }); |
| 148 | }); |
| 149 | } |
| 150 | |
| 151 | // Height/width overflow pass |
| 152 | if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { |
| 153 | // Make sure that nothing sneaks out |
| 154 | // Record all 3 overflow attributes because IE9-10 do not |
| 155 | // change the overflow attribute when overflowX and |
| 156 | // overflowY are set to the same value |
| 157 | opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; |
| 158 | |
| 159 | // Set display property to inline-block for height/width |
| 160 | // animations on inline elements that are having width/height animated |
| 161 | display = jQuery.css( elem, "display" ); |
| 162 | |
| 163 | // Test default display if display is currently "none" |
| 164 | checkDisplay = display === "none" ? |
| 165 | data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; |
| 166 | |
| 167 | if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { |
| 168 | style.display = "inline-block"; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | if ( opts.overflow ) { |
| 173 | style.overflow = "hidden"; |
| 174 | anim.always(function() { |
nothing calls this directly
no test coverage detected