From cf1497a58cd088d3f293d655803d230ee4cc4c07 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sat, 23 Apr 2016 22:06:52 -0400 Subject: [PATCH] Build: A more modest block-level function proposal This reverts commit fa610da68440530e73bba296a1f982f94dfeac99. --- Gruntfile.js | 1 - src/css/support.js | 37 +++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 04ccb7c3f..c979f2822 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -186,7 +186,6 @@ module.exports = function( grunt ) { banner: "/*! jQuery v<%= pkg.version %> | " + "(c) jQuery Foundation | jquery.org/license */", compress: { - "if_return": false, "hoist_funs": false, loops: false, unused: false diff --git a/src/css/support.js b/src/css/support.js index b0a0c4d10..73a5e6e1a 100644 --- a/src/css/support.js +++ b/src/css/support.js @@ -6,24 +6,6 @@ define( [ ], function( jQuery, document, documentElement, support ) { ( function() { - var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + - "padding:0;margin-top:1px;position:absolute"; - container.appendChild( div ); // Executing both pixelPosition & boxSizingReliable tests require only one layout // so they're executed at the same time to save the second computation. @@ -61,6 +43,25 @@ define( [ div = null; } + var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + + "padding:0;margin-top:1px;position:absolute"; + container.appendChild( div ); + jQuery.extend( support, { pixelPosition: function() { computeStyleTests(); -- 2.39.5