]> source.dussan.org Git - jquery.git/commitdiff
Restore support for Firefox < 23, Chrome < 28 and Safari 5.1.
authorMichał Gołębiowski <m.goleb@gmail.com>
Wed, 11 Sep 2013 01:35:46 +0000 (03:35 +0200)
committerMichał Gołębiowski <m.goleb@gmail.com>
Wed, 11 Sep 2013 01:35:46 +0000 (03:35 +0200)
test/unit/support.js

index 2b029ed1e0228e221e60698d8cd8b832d110327e..08685def17ec8b4416b62f914ec2461794e8eafa 100644 (file)
@@ -31,10 +31,11 @@ if ( jQuery.css ) {
 }
 
 (function() {
-       var expected,
+       var expected, version,
                userAgent = window.navigator.userAgent;
 
        if ( /chrome/i.test( userAgent ) ) {
+               version = userAgent.match( /chrome\/(\d+)/i )[ 1 ];
                expected = {
                        "ajax": true,
                        "boxSizingReliable": true,
@@ -46,7 +47,7 @@ if ( jQuery.css ) {
                        "noCloneChecked": true,
                        "optDisabled": true,
                        "optSelected": true,
-                       "pixelPosition": true,
+                       "pixelPosition": version >= 28,
                        "radioValue": true,
                        "reliableMarginRight": true
                };
@@ -114,10 +115,27 @@ if ( jQuery.css ) {
                        "radioValue": true,
                        "reliableMarginRight": true
                };
+       } else if ( /5\.1\.\d+ safari/i.test( userAgent ) ) {
+               expected = {
+                       "ajax":true,
+                       "boxSizingReliable": true,
+                       "checkClone":false,
+                       "checkOn":false,
+                       "clearCloneStyle": true,
+                       "cors":true,
+                       "focusinBubbles":false,
+                       "noCloneChecked":true,
+                       "optDisabled":true,
+                       "optSelected":true,
+                       "pixelPosition": false,
+                       "radioValue":true,
+                       "reliableMarginRight":true
+               };
        } else if ( /firefox/i.test( userAgent ) ) {
+               version = userAgent.match( /firefox\/(\d+)/i )[ 1 ];
                expected = {
                        "ajax": true,
-                       "boxSizingReliable": true,
+                       "boxSizingReliable": version >= 23,
                        "checkClone": true,
                        "checkOn": true,
                        "clearCloneStyle": true,