]> source.dussan.org Git - jquery.git/commitdiff
Fixes #11635, Explicit overflow:auto is overridden by inline overflow:hidden during...
authorMike Petrovich <michael.c.petrovich@gmail.com>
Tue, 16 Oct 2012 16:22:31 +0000 (12:22 -0400)
committerMike Sherov <mike.sherov@gmail.com>
Tue, 16 Oct 2012 16:30:28 +0000 (12:30 -0400)
src/sizzle
src/support.js
test/data/support/shrinkWrapBlocks.html [new file with mode: 0644]
test/unit/support.js

index f690144148d95adc867fa2a7e25be0e05eb2ecc7..3ed4e970e262230c799eaf24cc6d889828a3d6f3 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f690144148d95adc867fa2a7e25be0e05eb2ecc7
+Subproject commit 3ed4e970e262230c799eaf24cc6d889828a3d6f3
index f998f12701eb397c3e230fc02cab6360af7eda8c..7629c38e7fd4654e2d6d4a44ff5b7ad439628a89 100644 (file)
@@ -172,7 +172,7 @@ jQuery.support = (function() {
        // Run tests that need a body at doc ready
        jQuery(function() {
                var container, div, tds, marginDiv,
-                       divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+                       divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
                        body = document.getElementsByTagName("body")[0];
 
                if ( !body ) {
diff --git a/test/data/support/shrinkWrapBlocks.html b/test/data/support/shrinkWrapBlocks.html
new file mode 100644 (file)
index 0000000..af14939
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <style>
+               * {
+                       -webkit-box-sizing: border-box;
+                       -moz-box-sizing:    border-box;
+                       box-sizing:         border-box;
+               }
+       </style>
+</head>
+<body>
+       <div>
+               <script src="../../../dist/jquery.js"></script>
+       </div>
+       <script>
+               jQuery(function() {
+                       window.parent.iframeCallback( jQuery.support.shrinkWrapBlocks );
+               });
+       </script>
+</body>
+</html>
index 57378a02132249ebf584f6ce4b3b4237a7214f0d..fed13c7dd43d372c3b9b8dde85fffcc0a1673b5b 100644 (file)
@@ -38,6 +38,11 @@ testIframeWithCallback( "A background on the testElement does not cause IE8 to c
        ok( true, "IE8 does not crash" );
 });
 
+testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlocks", "support/shrinkWrapBlocks.html", function( shrinkWrapBlocks ) {
+       expect( 1 );
+       strictEqual( shrinkWrapBlocks, jQuery.support.shrinkWrapBlocks, "jQuery.support.shrinkWrapBlocks properties are the same" );
+});
+
 (function() {
 
        var userAgent = window.navigator.userAgent,