Commit 551f8510 authored by Mike Sherov's avatar Mike Sherov Committed by Dave Methvin

Fix #11443 #11441, shut up Chrome 19 and Safari 5.0.x. Closes gh-790.

checkClone and appendChecked test failures in Chrome 19; reliableMarginRight failures in Safari 5.
parent e0151e58
...@@ -179,7 +179,8 @@ jQuery.support = (function() { ...@@ -179,7 +179,8 @@ jQuery.support = (function() {
// Run tests that need a body at doc ready // Run tests that need a body at doc ready
jQuery(function() { jQuery(function() {
var container, offsetSupport, marginDiv, var container, marginDiv,
divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
conMarginTop = 1, conMarginTop = 1,
boxSizingPrefixes = [ "", "-moz-", "-webkit-", "" ], boxSizingPrefixes = [ "", "-moz-", "-webkit-", "" ],
body = document.getElementsByTagName("body")[0]; body = document.getElementsByTagName("body")[0];
...@@ -223,7 +224,7 @@ jQuery.support = (function() { ...@@ -223,7 +224,7 @@ jQuery.support = (function() {
if ( window.getComputedStyle ) { if ( window.getComputedStyle ) {
div.innerHTML = ""; div.innerHTML = "";
marginDiv = document.createElement( "div" ); marginDiv = document.createElement( "div" );
marginDiv.style.width = "0"; marginDiv.style.cssText = div.style.cssText = divReset;
marginDiv.style.marginRight = "0"; marginDiv.style.marginRight = "0";
div.style.width = "2px"; div.style.width = "2px";
div.appendChild( marginDiv ); div.appendChild( marginDiv );
...@@ -237,11 +238,7 @@ jQuery.support = (function() { ...@@ -237,11 +238,7 @@ jQuery.support = (function() {
// them layout // them layout
// (IE < 8 does this) // (IE < 8 does this)
div.innerHTML = ""; div.innerHTML = "";
div.style.width = div.style.padding = "1px"; div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
div.style.border = 0;
div.style.overflow = "hidden";
div.style.display = "inline";
div.style.zoom = 1;
support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
// Check if elements with layout shrink-wrap their children // Check if elements with layout shrink-wrap their children
...@@ -259,10 +256,7 @@ jQuery.support = (function() { ...@@ -259,10 +256,7 @@ jQuery.support = (function() {
support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
} }
offsetSupport = { support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
doesNotIncludeMarginInBodyOffset: ( body.offsetTop !== conMarginTop )
};
if ( typeof container.style.zoom !== "undefined" ) { if ( typeof container.style.zoom !== "undefined" ) {
container.style.zoom = 1; container.style.zoom = 1;
...@@ -270,8 +264,6 @@ jQuery.support = (function() { ...@@ -270,8 +264,6 @@ jQuery.support = (function() {
body.removeChild( container ); body.removeChild( container );
marginDiv = div = container = null; marginDiv = div = container = null;
jQuery.extend( support, offsetSupport );
}); });
return support; return support;
......
...@@ -40,7 +40,7 @@ var userAgent = window.navigator.userAgent; ...@@ -40,7 +40,7 @@ var userAgent = window.navigator.userAgent;
// These tests do not have to stay // These tests do not have to stay
// They are here to help with upcoming support changes for 1.8 // They are here to help with upcoming support changes for 1.8
if ( /chrome\/16\.0/i.test(userAgent) ) { if ( /chrome\/19\.0/i.test(userAgent) ) {
test("Verify that the support tests resolve as expected per browser", function() { test("Verify that the support tests resolve as expected per browser", function() {
var i, var i,
expected = { expected = {
...@@ -223,8 +223,8 @@ if ( /chrome\/16\.0/i.test(userAgent) ) { ...@@ -223,8 +223,8 @@ if ( /chrome\/16\.0/i.test(userAgent) ) {
"noCloneChecked":true, "noCloneChecked":true,
"optDisabled":true, "optDisabled":true,
"radioValue":true, "radioValue":true,
"checkClone":true, "checkClone":false,
"appendChecked":true, "appendChecked":false,
"boxModel":true, "boxModel":true,
"reliableHiddenOffsets":true, "reliableHiddenOffsets":true,
"ajax":true, "ajax":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