aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/attributes/support.js2
-rw-r--r--src/core.js4
-rw-r--r--src/core/init.js4
-rw-r--r--src/css.js2
-rw-r--r--src/css/curCSS.js28
-rw-r--r--src/css/hiddenVisibleSelectors.js4
-rw-r--r--src/css/support.js12
-rw-r--r--src/event.js13
-rw-r--r--src/manipulation.js12
-rw-r--r--src/manipulation/support.js5
-rw-r--r--src/offset.js6
-rw-r--r--test/unit/ajax.js15
-rw-r--r--test/unit/css.js6
-rw-r--r--test/unit/dimensions.js4
-rw-r--r--test/unit/event.js38
-rw-r--r--test/unit/serialize.js6
-rw-r--r--test/unit/support.js36
17 files changed, 56 insertions, 141 deletions
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("<div style='width:300px;height:300px;margin:2px;padding:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;'>test</div>"),
+ // Support: Android 2.3 (-webkit-box-sizing).
+ var el_dis = jQuery("<div style='width:300px;height:300px;margin:2px;padding:2px;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>"),
el = el_dis.clone().appendTo("#qunit-fixture");
equal( el.css("width"), el.css("width", el.css("width")).css("width"), "css('width') is not respecting box-sizing, see #11004");
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js
index ce132fd32..8d51c6cde 100644
--- a/test/unit/dimensions.js
+++ b/test/unit/dimensions.js
@@ -418,8 +418,8 @@ test( "getters on non elements should return null", function() {
test("setters with and without box-sizing:border-box", function(){
expect(20);
- // Support: Firefox<29, Android 2.3 (Prefixed box-sizing versions).
- var el_bb = jQuery("<div style='width:114px;height:114px;margin:5px;padding:3px;border:4px solid white;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;'>test</div>").appendTo("#qunit-fixture"),
+ // Support: Android 2.3 (-webkit-box-sizing).
+ var el_bb = jQuery("<div style='width:114px;height:114px;margin:5px;padding:3px;border:4px solid white;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>").appendTo("#qunit-fixture"),
el = jQuery("<div style='width:100px;height:100px;margin:5px;padding:3px;border:4px solid white;'>test</div>").appendTo("#qunit-fixture"),
expected = 100;
diff --git a/test/unit/event.js b/test/unit/event.js
index fe0f0c2da..1f08b4e95 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -1417,7 +1417,7 @@ test("Submit event can be stopped (#11049)", function() {
form.remove();
});
-// Test beforeunload event only if it supported (i.e. not Opera)
+// Test beforeunload event only if it supported.
// Support: iOS 7+, Android<4.0
// iOS & old Android have the window.onbeforeunload field but don't support the beforeunload
// handler making it impossible to feature-detect the support.
@@ -2431,32 +2431,26 @@ testIframeWithCallback( "focusin from an iframe", "event/focusinCrossFrame.html"
var input = jQuery( frameDoc ).find( "#frame-input" );
- if ( input.length ) {
- // Create a focusin handler on the parent; shouldn't affect the iframe's fate
- jQuery ( "body" ).on( "focusin.iframeTest", function() {
- ok( false, "fired a focusin event in the parent document" );
- });
-
- input.on( "focusin", function() {
- ok( true, "fired a focusin event in the iframe" );
- });
+ // Create a focusin handler on the parent; shouldn't affect the iframe's fate
+ jQuery ( "body" ).on( "focusin.iframeTest", function() {
+ ok( false, "fired a focusin event in the parent document" );
+ });
- // Avoid a native event; Chrome can't force focus to another frame
- input.trigger( "focusin" );
+ input.on( "focusin", function() {
+ ok( true, "fired a focusin event in the iframe" );
+ });
- // Must manually remove handler to avoid leaks in our data store
- input.remove();
+ // Avoid a native event; Chrome can't force focus to another frame
+ input.trigger( "focusin" );
- // Be sure it was removed; nothing should happen
- input.trigger( "focusin" );
+ // Must manually remove handler to avoid leaks in our data store
+ input.remove();
- // Remove body handler manually since it's outside the fixture
- jQuery( "body" ).off( "focusin.iframeTest" );
+ // Be sure it was removed; nothing should happen
+ input.trigger( "focusin" );
- } else {
- // Opera 12 (pre-Blink) doesn't select anything
- ok( true, "SOFTFAIL: no focus event fired in the iframe" );
- }
+ // Remove body handler manually since it's outside the fixture
+ jQuery( "body" ).off( "focusin.iframeTest" );
});
testIframeWithCallback( "jQuery.ready promise", "event/promiseReady.html", function( isOk ) {
diff --git a/test/unit/serialize.js b/test/unit/serialize.js
index 39e7d777e..54c75d62a 100644
--- a/test/unit/serialize.js
+++ b/test/unit/serialize.js
@@ -110,7 +110,7 @@ test("jQuery.param() Constructed prop values", function() {
});
test("serialize()", function() {
- expect(5);
+ expect(6);
// Add html5 elements only for serialize because selector can't yet find them on non-html5 browsers
jQuery("#search").after(
@@ -139,10 +139,8 @@ test("serialize()", function() {
"action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
"Multiple form serialization as query string");
- /* Temporarily disabled. Opera 10 has problems with form serialization.
equal( jQuery("#form, #testForm :input").serialize(),
- "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
+ "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
"Mixed form/input serialization as query string");
- */
jQuery("#html5email, #html5number").remove();
});
diff --git a/test/unit/support.js b/test/unit/support.js
index 97650bdff..80ce287d8 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -52,6 +52,8 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
userAgent = window.navigator.userAgent;
if ( /chrome/i.test( userAgent ) ) {
+ // Catches Chrome on Android as well (i.e. the default
+ // Android browser on Android >= 4.4).
expected = {
"ajax": true,
"boxSizingReliable": true,
@@ -67,22 +69,6 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableMarginRight": true
};
- } else if ( /opera.*version\/12\.1/i.test( userAgent ) ) {
- expected = {
- "ajax": true,
- "boxSizingReliable": true,
- "checkClone": true,
- "checkOn": true,
- "clearCloneStyle": true,
- "cors": true,
- "focusinBubbles": false,
- "noCloneChecked": true,
- "optDisabled": true,
- "optSelected": true,
- "pixelPosition": true,
- "radioValue": false,
- "reliableMarginRight": true
- };
} else if ( /trident\/7\.0/i.test( userAgent ) ) {
expected = {
"ajax": true,
@@ -163,22 +149,6 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"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 ) ) {
expected = {
"ajax": true,
@@ -195,7 +165,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableMarginRight": true
};
- } else if ( /iphone os (?:6|7)_/i.test( userAgent ) ) {
+ } else if ( /iphone os/i.test( userAgent ) ) {
expected = {
"ajax": true,
"boxSizingReliable": true,