From 02d7f9aee3fbe9b568702ecc4edd664245dc8917 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Wed, 2 Jan 2013 19:49:59 -0500 Subject: [PATCH] Remove support.reliableHiddenOffsets detect. --- src/css.js | 2 +- src/support.js | 24 ++---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/css.js b/src/css.js index 237caed4a..a29356e1b 100644 --- a/src/css.js +++ b/src/css.js @@ -537,7 +537,7 @@ jQuery(function() { if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + return elem.offsetWidth === 0 && elem.offsetHeight === 0; }; jQuery.expr.filters.visible = function( elem ) { diff --git a/src/support.js b/src/support.js index 68aed661d..35bf0e6f3 100644 --- a/src/support.js +++ b/src/support.js @@ -1,6 +1,6 @@ jQuery.support = (function() { - var support, all, a, select, opt, input, fragment, eventName, isSupported, i, + var support, all, a, select, opt, input, fragment, eventName, i, div = document.createElement("div"); // Setup @@ -114,28 +114,8 @@ jQuery.support = (function() { container = document.createElement("div"); container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // 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 - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
t
"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - // Check box-sizing and margin behavior + body.appendChild( container ).appendChild( div ); div.innerHTML = ""; div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; support.boxSizing = ( div.offsetWidth === 4 ); -- 2.39.5