]> source.dussan.org Git - jquery.git/commitdiff
Build: A more modest block-level function proposal
authorRichard Gibson <richard.gibson@gmail.com>
Sun, 24 Apr 2016 02:06:52 +0000 (22:06 -0400)
committerRichard Gibson <richard.gibson@gmail.com>
Sun, 24 Apr 2016 02:14:25 +0000 (22:14 -0400)
This reverts commit fa610da68440530e73bba296a1f982f94dfeac99.

Gruntfile.js
src/css/support.js

index 04ccb7c3f201f59e50ae8204df1ef3c931dd76f1..c979f282217ef9efa4ab7e2ddf44877c2d8d3bbd 100644 (file)
@@ -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
index b0a0c4d104d5a96b77f4a52aaaf4dc286687c2c7..73a5e6e1a70a7e00364aca2f0887215a7782c0ad 100644 (file)
@@ -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();