diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-06-07 11:08:31 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-06-07 11:08:31 -0400 |
commit | c80bc227280e9708dc9c3613ece9397f55f382ed (patch) | |
tree | af6b66e1c8e1d988a16ac39ee5e386f8453c4cb5 /test/unit | |
parent | 79af1b457baf6e66fff831e7328e06f823445910 (diff) | |
download | jquery-c80bc227280e9708dc9c3613ece9397f55f382ed.tar.gz jquery-c80bc227280e9708dc9c3613ece9397f55f382ed.zip |
Don't swap to measure dimensions unless the element is display:none. #807 Fixes #11293
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/dimensions.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 53e37b95d..6fc346dce 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -299,6 +299,16 @@ test("outerWidth(true) returning % instead of px in Webkit, see #10639", functio equal( el.outerWidth(true), 400, "outerWidth(true) and css('margin') returning % instead of px in Webkit, see #10639" ); }); +test( "getting dimensions of zero width/height table elements shouldn't alter dimensions", function() { + expect( 1 ); + + var table = jQuery("<table><tbody><tr><td></td><td>a</td></tr><tr><td></td><td>a</td></tr></tbody></table>").appendTo("#qunit-fixture"), + elem = table.find("tr:eq(0) td:eq(0)"); + + table.find("td").css({ margin: 0, padding: 0 }); + equal( elem.width(), elem.width(), "width() doesn't alter dimension values" ); +}); + test("box-sizing:border-box child of a hidden elem (or unconnected node) has accurate inner/outer/Width()/Height() see #10413", function() { expect(16); |