Misc: Drop support for older browsers; update support comments

That includes IE<8, Opera 12.x, Firefox<29, Safari<6.0 and some hacks
for old Blackberry.

Fixes gh-1836
Fixes gh-1701
Refs gh-1815
Refs gh-1820
This commit is contained in:
Michał Gołębiowski
2014-11-03 19:53:22 +01:00
committed by Michał Gołębiowski
parent a467f8653a
commit 90d7cc1d8b
41 changed files with 253 additions and 1074 deletions

View File

@@ -36,12 +36,11 @@ if ( window.getComputedStyle ) {
ret = jQuery.style( elem, name );
}
// Support: Android 4.0-4.3
// A tribute to the "awesome hack by Dean Edwards"
// Chrome < 17 and Safari 5.0 uses "computed value"
// instead of "used value" for margin-right
// Safari 5.1.7 (at least) returns percentage for a larger set of values,
// but width seems to be reliably pixels
// this is against the CSSOM draft spec:
// Android Browser returns percentage for some 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 ) ) {
@@ -61,7 +60,7 @@ if ( window.getComputedStyle ) {
}
}
// Support: IE
// Support: IE9-11+
// IE returns zIndex value as an integer.
return ret === undefined ?
ret :
@@ -115,7 +114,7 @@ if ( window.getComputedStyle ) {
}
}
// Support: IE
// Support: IE<9
// IE returns zIndex value as an integer.
return ret === undefined ?
ret :

View File

@@ -6,11 +6,9 @@ define([
], function( jQuery, support ) {
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 ||
(!support.reliableHiddenOffsets() &&
((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
};

View File

@@ -33,11 +33,6 @@ define([
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
// Support: Firefox<29, Android 2.3
// Vendor-prefix box-sizing
support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
style.WebkitBoxSizing === "";
jQuery.extend(support, {
reliableHiddenOffsets: function() {
if ( reliableHiddenOffsetsVal == null ) {
@@ -71,9 +66,9 @@ define([
function computeStyleTests() {
// Minified: var b,c,d,j
var div, body, container, contents;
var div, container, contents,
body = document.body;
body = document.getElementsByTagName( "body" )[ 0 ];
if ( !body || !body.style ) {
// Test fired too early or in an unsupported environment, exit.
return;
@@ -86,10 +81,10 @@ define([
body.appendChild( container ).appendChild( div );
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";
// Support: IE<9
@@ -111,10 +106,10 @@ define([
// Reset CSS: box-sizing; display; margin; border; padding
contents.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";
contents.style.marginRight = contents.style.width = "0";
div.style.width = "1px";
@@ -124,7 +119,7 @@ define([
div.removeChild( contents );
}
// Support: IE8
// Support: IE<9
// Check if table cells still have offsetWidth/Height when they are set
// to display:none and there are still other visible table cells in a
// table row; if so, offsetWidth/Height are not reliable for use when