Commit 1a9f8d9b authored by Timmy Willison's avatar Timmy Willison

Fix more support tests (support.input should only be false in IE8 and...

Fix more support tests (support.input should only be false in IE8 and checkClone as it is now used is fine in IE)
parent d092a88e
...@@ -44,8 +44,9 @@ define([ ...@@ -44,8 +44,9 @@ define([
select.disabled = true; select.disabled = true;
support.optDisabled = !opt.disabled; support.optDisabled = !opt.disabled;
// Support: IE8 only
// Check if we can trust getAttribute("value") // Check if we can trust getAttribute("value")
input = document.createElement("input"); input = document.createElement( "input" );
input.setAttribute( "value", "" ); input.setAttribute( "value", "" );
support.input = input.getAttribute( "value" ) === ""; support.input = input.getAttribute( "value" ) === "";
......
...@@ -23,11 +23,7 @@ jQuery(function() { ...@@ -23,11 +23,7 @@ jQuery(function() {
// We need to execute this one support test ASAP because we need to know // We need to execute this one support test ASAP because we need to know
// if body.style.zoom needs to be set. // if body.style.zoom needs to be set.
var container, var container, div,
div = document.createElement( "div" ),
divReset =
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;" +
"display:block;padding:0;margin:0;border:0",
body = document.getElementsByTagName("body")[0]; body = document.getElementsByTagName("body")[0];
if ( !body ) { if ( !body ) {
...@@ -36,12 +32,10 @@ jQuery(function() { ...@@ -36,12 +32,10 @@ jQuery(function() {
} }
// Setup // Setup
div.setAttribute( "className", "t" );
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
container = document.createElement( "div" ); container = document.createElement( "div" );
container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
div = document.createElement( "div" );
body.appendChild( container ).appendChild( div ); body.appendChild( container ).appendChild( div );
if ( typeof div.style.zoom !== strundefined ) { if ( typeof div.style.zoom !== strundefined ) {
...@@ -49,10 +43,9 @@ jQuery(function() { ...@@ -49,10 +43,9 @@ jQuery(function() {
// Check if natively block-level elements act like inline-block // Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving // elements when setting their display to 'inline' and giving
// them layout // them layout
div.innerHTML = ""; div.style.cssText = "width:1px;padding:1px;display:inline;zoom:1";
div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
if ( (support.inlineBlockNeedsLayout = div.offsetWidth === 3) ) { if ( (support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 )) ) {
// Prevent IE 6 from affecting layout for positioned elements #11048 // Prevent IE 6 from affecting layout for positioned elements #11048
// Prevent IE from shrinking the body in IE 7 mode #12869 // Prevent IE from shrinking the body in IE 7 mode #12869
// Support: IE<8 // Support: IE<8
......
...@@ -26,6 +26,7 @@ test( "zoom of doom (#13089)", function() { ...@@ -26,6 +26,7 @@ test( "zoom of doom (#13089)", function() {
ok( !document.body.style.zoom, "No zoom added to the body" ); ok( !document.body.style.zoom, "No zoom added to the body" );
} }
}); });
if ( jQuery.css ) { if ( jQuery.css ) {
testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) { testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) {
expect( 2 ); expect( 2 );
...@@ -256,7 +257,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo ...@@ -256,7 +257,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
"boxSizing": false, "boxSizing": false,
"boxSizingReliable": true, "boxSizingReliable": true,
"changeBubbles": false, "changeBubbles": false,
"checkClone": false, "checkClone": true,
"checkOn": true, "checkOn": true,
"clearCloneStyle": true, "clearCloneStyle": true,
"cors": false, "cors": false,
...@@ -269,7 +270,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo ...@@ -269,7 +270,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
"html5Clone": false, "html5Clone": false,
"htmlSerialize": false, "htmlSerialize": false,
"inlineBlockNeedsLayout": true, "inlineBlockNeedsLayout": true,
"input": false, "input": true,
"leadingWhitespace": false, "leadingWhitespace": false,
"noCloneChecked": false, "noCloneChecked": false,
"noCloneEvent": false, "noCloneEvent": false,
...@@ -293,7 +294,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo ...@@ -293,7 +294,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
"boxSizing": false, "boxSizing": false,
"boxSizingReliable": true, "boxSizingReliable": true,
"changeBubbles": false, "changeBubbles": false,
"checkClone": false, "checkClone": true,
"checkOn": true, "checkOn": true,
"clearCloneStyle": true, "clearCloneStyle": true,
"cors": false, "cors": false,
...@@ -306,7 +307,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo ...@@ -306,7 +307,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
"html5Clone": false, "html5Clone": false,
"htmlSerialize": false, "htmlSerialize": false,
"inlineBlockNeedsLayout": true, "inlineBlockNeedsLayout": true,
"input": false, "input": true,
"leadingWhitespace": false, "leadingWhitespace": false,
"noCloneChecked": false, "noCloneChecked": false,
"noCloneEvent": false, "noCloneEvent": false,
...@@ -380,6 +381,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo ...@@ -380,6 +381,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
"html5Clone": true, "html5Clone": true,
"htmlSerialize": true, "htmlSerialize": true,
"inlineBlockNeedsLayout": false, "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true, "leadingWhitespace": true,
"noCloneChecked": true, "noCloneChecked": true,
"noCloneEvent": true, "noCloneEvent": true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment