aboutsummaryrefslogtreecommitdiffstats
path: root/src/support.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-06-15 21:20:41 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-06-15 21:25:25 -0400
commit0b352f6cb58a1ece3f5d1fb978cdb40bd5b0e854 (patch)
treee1b5fc8164ce147cdba540724b0c2c2c529a4ad2 /src/support.js
parenta101e81bde71e94170f1fa899432cbe8150910f9 (diff)
downloadjquery-0b352f6cb58a1ece3f5d1fb978cdb40bd5b0e854.tar.gz
jquery-0b352f6cb58a1ece3f5d1fb978cdb40bd5b0e854.zip
Fix #9505, percentage position values in Webkit, closes gh-825.
Diffstat (limited to 'src/support.js')
-rw-r--r--src/support.js6
1 files changed, 4 insertions, 2 deletions
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