Skip to content

Commit 65d7184

Browse files
committed
Revert "Misc: Drop support for older browsers; update support comments"
This reverts commit 740e190.
1 parent ae88b39 commit 65d7184

File tree

15 files changed

+93
-33
lines changed

15 files changed

+93
-33
lines changed

src/attributes/support.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define( [
1010

1111
input.type = "checkbox";
1212

13-
// Support: Android<4.4
13+
// Support: iOS<=5.1, Android<=4.2+
1414
// Default value for a checkbox should be "on"
1515
support.checkOn = input.value !== "";
1616

src/core.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jQuery.extend( {
255255
return obj + "";
256256
}
257257

258-
// Support: Android<4.0 (functionish RegExp)
258+
// Support: Android<4.0, iOS<6 (functionish RegExp)
259259
return typeof obj === "object" || typeof obj === "function" ?
260260
class2type[ toString.call( obj ) ] || "object" :
261261
typeof obj;
@@ -348,8 +348,6 @@ jQuery.extend( {
348348
return arr == null ? -1 : indexOf.call( arr, elem, i );
349349
},
350350

351-
// Support: Android<4.1, PhantomJS<2
352-
// push.apply(_, arraylike) throws on ancient WebKit
353351
merge: function( first, second ) {
354352
var len = +second.length,
355353
j = 0,

src/core/init.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ var rootjQuery,
7575
} else {
7676
elem = document.getElementById( match[ 2 ] );
7777

78-
if ( elem ) {
78+
// Support: Blackberry 4.6
79+
// gEBID returns nodes no longer in the document (#6963)
80+
if ( elem && elem.parentNode ) {
7981

8082
// Inject the element directly into the jQuery object
8183
this.length = 1;

src/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var
3636
fontWeight: "400"
3737
},
3838

39-
cssPrefixes = [ "Webkit", "Moz", "ms" ],
39+
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
4040
emptyStyle = document.createElement( "div" ).style;
4141

4242
// Return a css property mapped to a potentially vendor prefixed property

src/css/curCSS.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ define( [
55
"./var/getStyles",
66
"./support",
77
"../selector" // Get jQuery.contains
8-
], function( jQuery, rnumnonpx, rmargin, getStyles, support ) {
8+
], function( jQuery, rnumnonpx, rmargin, getStyles ) {
99

1010
function curCSS( elem, name, computed ) {
1111
var width, minWidth, maxWidth, ret,
@@ -22,12 +22,13 @@ function curCSS( elem, name, computed ) {
2222
ret = jQuery.style( elem, name );
2323
}
2424

25+
// Support: iOS < 6, Android 4.0-4.3 only
2526
// A tribute to the "awesome hack by Dean Edwards"
26-
// Android Browser returns percentage for some values,
27-
// but width seems to be reliably pixels.
28-
// This is against the CSSOM draft spec:
27+
// iOS < 6 (at least) returns percentage for a larger set of values,
28+
// but width seems to be reliably pixels
29+
// this is against the CSSOM draft spec:
2930
// http://dev.w3.org/csswg/cssom/#resolved-values
30-
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
31+
if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
3132

3233
// Remember the original values
3334
width = style.width;

src/css/hiddenVisibleSelectors.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ define( [
44
], function( jQuery ) {
55

66
jQuery.expr.filters.hidden = function( elem ) {
7-
return !jQuery.expr.filters.visible( elem );
7+
8+
// Support: Opera <= 12.12
9+
// Opera reports offsetWidths and offsetHeights less than zero on some elements
10+
// Use OR instead of AND as the element is not visible if either is true
11+
// See tickets #10406 and #13132
12+
return elem.offsetWidth <= 0 || elem.offsetHeight <= 0;
813
};
914
jQuery.expr.filters.visible = function( elem ) {
1015
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );

src/css/support.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ define( [
2929
// so they're executed at the same time to save the second computation.
3030
function computeStyleTests() {
3131
div.style.cssText =
32-
"box-sizing:border-box;" +
33-
"position:relative;display:block;" +
34-
"margin:auto;border:1px;padding:1px;" +
35-
"top:1%;width:50%";
32+
33+
// Support: Firefox<29, Android 2.3
34+
// Vendor-prefix box-sizing
35+
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
36+
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
37+
"border:1px;padding:1px;width:4px;position:absolute";
3638
div.innerHTML = "";
3739
documentElement.appendChild( container );
3840

src/event.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,13 @@ jQuery.event = {
469469
event[ prop ] = originalEvent[ prop ];
470470
}
471471

472-
// Support: Safari 6-8+
472+
// Support: Cordova 2.5 (WebKit) (#13255)
473+
// All events should have a target; Cordova deviceready doesn't
474+
if ( !event.target ) {
475+
event.target = document;
476+
}
477+
478+
// Support: Safari 6.0+, Chrome<28
473479
// Target should not be a text node (#504, #13143)
474480
if ( event.target.nodeType === 3 ) {
475481
event.target = event.target.parentNode;

src/manipulation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ jQuery.each( {
464464
elems = i === last ? this : this.clone( true );
465465
jQuery( insert[ i ] )[ original ]( elems );
466466

467-
// Support: Android<4.1, PhantomJS<2
468-
// .get() because push.apply(_, arraylike) throws on ancient WebKit
467+
// Support: QtWebKit
468+
// .get() because push.apply(_, arraylike) throws
469469
push.apply( ret, elems.get() );
470470
}
471471

src/manipulation/support.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ define( [
88
div = fragment.appendChild( document.createElement( "div" ) ),
99
input = document.createElement( "input" );
1010

11-
// Support: Android 4.0-4.3
11+
// Support: Android 4.0-4.3, Safari<=5.1
1212
// Check state lost if the name is set (#11217)
1313
// Support: Windows Web Apps (WWA)
1414
// `name` and `type` must use .setAttribute for WWA (#14901)
@@ -18,7 +18,7 @@ define( [
1818

1919
div.appendChild( input );
2020

21-
// Support: Android<4.2
21+
// Support: Safari<=5.1, Android<4.2
2222
// Older WebKit doesn't clone checked state correctly in fragments
2323
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
2424

0 commit comments

Comments
 (0)