aboutsummaryrefslogtreecommitdiffstats
path: root/src/support.js
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2013-04-04 22:04:39 +0200
committerDave Methvin <dave.methvin@gmail.com>2013-04-06 17:09:52 -0400
commitdca7681284731053124e6437c5bec58e030cc91d (patch)
tree6646d538c7866f9336f2ac11a6e181b616a5632f /src/support.js
parent1b610266502490eab42a0b9ddfac2f93da0b0fe1 (diff)
downloadjquery-dca7681284731053124e6437c5bec58e030cc91d.tar.gz
jquery-dca7681284731053124e6437c5bec58e030cc91d.zip
Improve CSS and `Support:` comments. Close gh-1220.
1) corrected box-sizing rules order - the unprefixed value should always be the last one 2) removed last semi-colons in CSS rules 3) updated support comments code review changes + more consistent comment spacing
Diffstat (limited to 'src/support.js')
-rw-r--r--src/support.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/support.js b/src/support.js
index 52f832f42..a28fb971f 100644
--- a/src/support.js
+++ b/src/support.js
@@ -12,6 +12,7 @@ jQuery.support = (function( support ) {
input.type = "checkbox";
+ // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
// Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
support.checkOn = input.value !== "";
@@ -38,7 +39,7 @@ jQuery.support = (function( support ) {
support.optDisabled = !opt.disabled;
// Check if an input maintains its value after becoming a radio
- // Support: IE9, IE10, Opera
+ // Support: IE9, IE10
input = document.createElement("input");
input.value = "t";
input.type = "radio";
@@ -50,10 +51,11 @@ jQuery.support = (function( support ) {
fragment.appendChild( input );
+ // Support: Safari 5.1, Android 4.x, Android 2.3
// old WebKit doesn't clone checked state correctly in fragments
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
- // Support: Firefox 17+
+ // Support: Firefox, Chrome, Safari
// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
support.focusinBubbles = "onfocusin" in window;
@@ -64,7 +66,8 @@ jQuery.support = (function( support ) {
// Run tests that need a body at doc ready
jQuery(function() {
var container, marginDiv,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
+ // Support: Firefox, Android 2.3 (Prefixed box-sizing versions).
+ divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",
body = document.getElementsByTagName("body")[ 0 ];
if ( !body ) {
@@ -78,7 +81,8 @@ jQuery.support = (function( support ) {
// Check box-sizing and margin behavior.
body.appendChild( container ).appendChild( div );
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%;position:absolute;top:1%;";
+ // Support: Firefox, Android 2.3 (Prefixed box-sizing versions).
+ div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%";
// Workaround failing boxSizing test due to offsetWidth returning wrong value
// with some non-1 values of body zoom, ticket #13543
@@ -91,9 +95,9 @@ jQuery.support = (function( support ) {
support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+ // Support: Android 2.3
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
marginDiv = div.appendChild( document.createElement("div") );
marginDiv.style.cssText = div.style.cssText = divReset;