diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2012-06-18 13:26:46 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-06-18 13:27:04 -0400 |
commit | f7ee1f6e59f0b465f5f64bf6ac52108e445efaac (patch) | |
tree | c5d0eb3ea5b9ba11fa8d8e0e9bfe97f34fca9cdf /src/support.js | |
parent | ab542c11cafd494e15bd84df3958a5e8876f02fe (diff) | |
download | jquery-f7ee1f6e59f0b465f5f64bf6ac52108e445efaac.tar.gz jquery-f7ee1f6e59f0b465f5f64bf6ac52108e445efaac.zip |
Update document.defaultView.getComputedStyle. Fixes #10373
Diffstat (limited to 'src/support.js')
-rw-r--r-- | src/support.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/support.js b/src/support.js index 06170a39b..334175ff6 100644 --- a/src/support.js +++ b/src/support.js @@ -210,6 +210,11 @@ jQuery.support = (function() { 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 ); + + // NOTE: To any future maintainer, window.getComputedStyle was used here + // instead of getComputedStyle because it gave a better gzip size. + // The difference between window.getComputedStyle and getComputedStyle is + // 7 bytes if ( window.getComputedStyle ) { support.pixelMargin = ( window.getComputedStyle( div, null ) || {} ).marginTop !== "1%"; support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; |