diff --git a/src/attributes/support.js b/src/attributes/support.js index 5db5c5212..bc5eb472e 100644 --- a/src/attributes/support.js +++ b/src/attributes/support.js @@ -9,7 +9,7 @@ define([ input.type = "checkbox"; - // Support: iOS<=5.1, Android<=4.2+ + // Support: Android<4.4 // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; diff --git a/src/core.js b/src/core.js index 2b3fbb180..0dd80dd33 100644 --- a/src/core.js +++ b/src/core.js @@ -250,7 +250,7 @@ jQuery.extend({ if ( obj == null ) { return obj + ""; } - // Support: Android<4.0, iOS<6 (functionish RegExp) + // Support: Android<4.0 (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call(obj) ] || "object" : typeof obj; @@ -354,6 +354,8 @@ jQuery.extend({ return arr == null ? -1 : indexOf.call( arr, elem, i ); }, + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { var len = +second.length, j = 0, diff --git a/src/core/init.js b/src/core/init.js index 50f310c56..9beaedd04 100644 --- a/src/core/init.js +++ b/src/core/init.js @@ -69,9 +69,7 @@ var rootjQuery, } else { elem = document.getElementById( match[2] ); - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { + if ( elem ) { // Inject the element directly into the jQuery object this.length = 1; this[0] = elem; diff --git a/src/css.js b/src/css.js index 94a1d234f..d8e60b857 100644 --- a/src/css.js +++ b/src/css.js @@ -34,7 +34,7 @@ var fontWeight: "400" }, - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + cssPrefixes = [ "Webkit", "Moz", "ms" ]; // Return a css property mapped to a potentially vendor prefixed property function vendorPropName( style, name ) { diff --git a/src/css/curCSS.js b/src/css/curCSS.js index 420d19fa9..260184b47 100644 --- a/src/css/curCSS.js +++ b/src/css/curCSS.js @@ -7,8 +7,7 @@ define([ ], function( jQuery, rnumnonpx, rmargin, getStyles ) { function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - style = elem.style; + var ret; computed = computed || getStyles( elem ); @@ -23,33 +22,10 @@ function curCSS( elem, name, computed ) { if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } - - // Support: iOS < 6 - // A tribute to the "awesome hack by Dean Edwards" - // iOS < 6 (at least) returns percentage for a larger set of values, - // but width seems to be reliably pixels - // this is against the CSSOM draft spec: - // http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } } return ret !== undefined ? - // Support: IE + // Support: IE9-11+ // IE returns zIndex value as an integer. ret + "" : ret; diff --git a/src/css/hiddenVisibleSelectors.js b/src/css/hiddenVisibleSelectors.js index 2b1eb8155..01ecc3396 100644 --- a/src/css/hiddenVisibleSelectors.js +++ b/src/css/hiddenVisibleSelectors.js @@ -4,11 +4,9 @@ define([ ], function( jQuery ) { jQuery.expr.filters.hidden = function( elem ) { - // Support: Opera <= 12.12 - // Opera reports offsetWidths and offsetHeights less than zero on some elements // Use OR instead of AND as the element is not visible if either is true // See tickets #10406 and #13132 - return elem.offsetWidth <= 0 || elem.offsetHeight <= 0; + return !elem.offsetWidth || !elem.offsetHeight; }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); diff --git a/src/css/support.js b/src/css/support.js index 2cb6fe81d..4279d12e7 100644 --- a/src/css/support.js +++ b/src/css/support.js @@ -27,10 +27,10 @@ define([ // so they're executed at the same time to save the second computation. function computePixelPositionAndBoxSizingReliable() { div.style.cssText = - // Support: Firefox<29, Android 2.3 + // Support: Android 2.3 // Vendor-prefix box-sizing - "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + - "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + + "-webkit-box-sizing:border-box;box-sizing:border-box;" + + "display:block;margin-top:1%;top:1%;" + "border:1px;padding:1px;width:4px;position:absolute"; div.innerHTML = ""; docElem.appendChild( container ); @@ -72,10 +72,10 @@ define([ // Reset CSS: box-sizing; display; margin; border; padding marginDiv.style.cssText = div.style.cssText = - // Support: Firefox<29, Android 2.3 + // Support: Android 2.3 // Vendor-prefix box-sizing - "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + - "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; + "-webkit-box-sizing:content-box;box-sizing:content-box;" + + "display:block;margin:0;border:0;padding:0"; marginDiv.style.marginRight = marginDiv.style.width = "0"; div.style.width = "1px"; docElem.appendChild( container ); diff --git a/src/event.js b/src/event.js index 7cf14c5c9..aee6cb78f 100644 --- a/src/event.js +++ b/src/event.js @@ -536,13 +536,7 @@ jQuery.event = { event[ prop ] = originalEvent[ prop ]; } - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 + // Support: Safari 6.0+ // Target should not be a text node (#504, #13143) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; @@ -709,7 +703,10 @@ jQuery.Event.prototype = { }; // Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// Support: Safari<7.0 +// Safari doesn't support mouseenter/mouseleave at all. jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout", diff --git a/src/manipulation.js b/src/manipulation.js index 0b2637db6..52b83c71b 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -204,7 +204,7 @@ jQuery.extend({ // Add nodes directly if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit, PhantomJS + // Support: Android<4.1, PhantomJS<2 // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); @@ -227,7 +227,7 @@ jQuery.extend({ tmp = tmp.lastChild; } - // Support: QtWebKit, PhantomJS + // Support: Android<4.1, PhantomJS<2 // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); @@ -514,8 +514,8 @@ jQuery.fn.extend({ // Keep references to cloned scripts for later restoration if ( hasScripts ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( scripts, getAll( node, "script" ) ); } } @@ -572,8 +572,8 @@ jQuery.each({ elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws + // Support: Android<4.1, PhantomJS<2 + // .get() because push.apply(_, arraylike) throws on ancient WebKit push.apply( ret, elems.get() ); } diff --git a/src/manipulation/support.js b/src/manipulation/support.js index 822a014f5..92c92b5ff 100644 --- a/src/manipulation/support.js +++ b/src/manipulation/support.js @@ -7,17 +7,14 @@ define([ div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); - // Support: Safari<=5.1 - // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); div.appendChild( input ); - // Support: Safari<=5.1, Android<4.2 + // Support: Android<4.2 // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; diff --git a/src/offset.js b/src/offset.js index ffd049157..aee95efde 100644 --- a/src/offset.js +++ b/src/offset.js @@ -96,11 +96,7 @@ jQuery.fn.extend({ return box; } - // Support: BlackBerry 5, iOS 3 (original iPhone) - // If we don't have gBCR, just use 0,0 rather than error - if ( elem.getBoundingClientRect ) { - box = elem.getBoundingClientRect(); - } + box = elem.getBoundingClientRect(); win = getWindow( doc ); return { top: box.top + win.pageYOffset - docElem.clientTop, diff --git a/test/unit/ajax.js b/test/unit/ajax.js index d61d6b40d..6f3bacebe 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1019,9 +1019,6 @@ module( "ajax", { " (no cache)": false }, function( label, cache ) { - // Support: Opera 12.0 - // In Opera 12.0, XHR doesn't notify 304 back to the user properly - var opera = window.opera && window.opera.version(); jQuery.each( { "If-Modified-Since": "if_modified_since.php", @@ -1041,15 +1038,9 @@ module( "ajax", { ifModified: true, cache: cache, success: function( data, status, jqXHR ) { - if ( status === "success" && opera === "12.00" ) { - strictEqual( status, "success", "Opera 12.0: Following status is 'success'" ); - strictEqual( jqXHR.status, 200, "Opera 12.0: XHR status is 200, not 304" ); - strictEqual( data, "", "Opera 12.0: response body is empty" ); - } else { - strictEqual( status, "notmodified", "Following status is 'notmodified'" ); - strictEqual( jqXHR.status, 304, "XHR status is 304" ); - equal( data, null, "no response body is given" ); - } + strictEqual( status, "notmodified", "Following status is 'notmodified'" ); + strictEqual( jqXHR.status, 304, "XHR status is 304" ); + equal( data, null, "no response body is given" ); }, complete: function() { start(); diff --git a/test/unit/css.js b/test/unit/css.js index 8337f7df7..97eb1e9a6 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -228,8 +228,6 @@ test("css(String, Object)", function() { j = jQuery("#nonnodes").contents(); j.css("overflow", "visible"); equal( j.css("overflow"), "visible", "Check node,textnode,comment css works" ); - // opera sometimes doesn't update 'display' correctly, see #2037 - jQuery("#t2037")[0].innerHTML = jQuery("#t2037")[0].innerHTML; equal( jQuery("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" ); div = jQuery("#nothiddendiv"); @@ -790,8 +788,8 @@ test("Do not append px (#9548, #12990)", function() { test("css('width') and css('height') should respect box-sizing, see #11004", function() { expect( 4 ); - // Support: Firefox<29, Android 2.3 (Prefixed box-sizing versions). - var el_dis = jQuery("