Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug #2185 is one of the top duplicate bugs in the bug tracker. This patch should also improve animation performance since it no longer checks and resets the display mode of an element every time the effect updates. This patch uses inline-block in all browsers except IE6 and IE7, which use a different inline+hasLayout technique for elements which are block-level by default. This also adds two new support tests,
inlineBlockNeedsLayout
andshrinkWrapBlocks
.IE6 needed some additional fixes, since any element with layout will shrink-wrap its content instead of allowing the content to flow outside the bounding box. IE7 does not exhibit this behaviour. This means that now, overflow is not reset after a width/height animation in IE6. This part can be backed out (it is the only thing in the last two commits), but doing so means that unit tests for animations that test the width/height of elements after an animation will fail in IE6 because the elements are shrink wrapped to their content size. (There was one test that was doing this in the original test suite, but the test was invalid because it was operating on an element inside a container with display: none, so it succeeded when it should have failed. The test suite has been updated to use offscreen drawing so this does not happen again in the future.)
Bug #4512 needed to be fixed in order to properly implement the changes for #2185, as the update exposed this broken functionality in IE when trying to show() table elements. This fix basically involves checking at init whether it’s safe to rely on the offsetWidth/Height for elements that have had
display: none
set directly; if it isn’t, then the CSS property is also checked. This adds a new support test,reliableHiddenOffsets
.Bug #7111 is just a quick enhancement to already existing functionality that I was able to throw in with the rest of the changes in about 5 minutes. Nothing special here, except to note that unlike other browsers, IE does not change the
overflow
property ifoverflow-x
andoverflow-y
both match, so all 3 end up needing to be reset.I tried to keep the animate stuff and the :visible stuff in separate commits so that they can be landed separately if needed.
Cheers,