From 0b352f6cb58a1ece3f5d1fb978cdb40bd5b0e854 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Fri, 15 Jun 2012 21:20:41 -0400 Subject: Fix #9505, percentage position values in Webkit, closes gh-825. --- src/support.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/support.js') diff --git a/src/support.js b/src/support.js index 65081e40c..06170a39b 100644 --- a/src/support.js +++ b/src/support.js @@ -90,7 +90,8 @@ jQuery.support = (function() { shrinkWrapBlocks: false, reliableMarginRight: true, pixelMargin: true, - boxSizingReliable: true + boxSizingReliable: true, + pixelPosition: false }; // Make sure checked status is properly cloned @@ -206,11 +207,12 @@ jQuery.support = (function() { // Check box-sizing and margin behavior div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;"; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; support.boxSizing = ( div.offsetWidth === 4 ); support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); if ( window.getComputedStyle ) { support.pixelMargin = ( window.getComputedStyle( div, null ) || {} ).marginTop !== "1%"; + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; // Check if div with explicit width and no margin-right incorrectly -- cgit v1.2.3