Skip to content

Commit cf1497a

Browse files
committed
Build: A more modest block-level function proposal
This reverts commit fa610da.
1 parent a51cb25 commit cf1497a

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

Gruntfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ module.exports = function( grunt ) {
186186
banner: "/*! jQuery v<%= pkg.version %> | " +
187187
"(c) jQuery Foundation | jquery.org/license */",
188188
compress: {
189-
"if_return": false,
190189
"hoist_funs": false,
191190
loops: false,
192191
unused: false

src/css/support.js

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,6 @@ define( [
66
], function( jQuery, document, documentElement, support ) {
77

88
( function() {
9-
var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
10-
container = document.createElement( "div" ),
11-
div = document.createElement( "div" );
12-
13-
// Finish early in limited (non-browser) environments
14-
if ( !div.style ) {
15-
return;
16-
}
17-
18-
// Support: IE <=9 - 11 only
19-
// Style of cloned element affects source element cloned (#8908)
20-
div.style.backgroundClip = "content-box";
21-
div.cloneNode( true ).style.backgroundClip = "";
22-
support.clearCloneStyle = div.style.backgroundClip === "content-box";
23-
24-
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
25-
"padding:0;margin-top:1px;position:absolute";
26-
container.appendChild( div );
279

2810
// Executing both pixelPosition & boxSizingReliable tests require only one layout
2911
// so they're executed at the same time to save the second computation.
@@ -61,6 +43,25 @@ define( [
6143
div = null;
6244
}
6345

46+
var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
47+
container = document.createElement( "div" ),
48+
div = document.createElement( "div" );
49+
50+
// Finish early in limited (non-browser) environments
51+
if ( !div.style ) {
52+
return;
53+
}
54+
55+
// Support: IE <=9 - 11 only
56+
// Style of cloned element affects source element cloned (#8908)
57+
div.style.backgroundClip = "content-box";
58+
div.cloneNode( true ).style.backgroundClip = "";
59+
support.clearCloneStyle = div.style.backgroundClip === "content-box";
60+
61+
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
62+
"padding:0;margin-top:1px;position:absolute";
63+
container.appendChild( div );
64+
6465
jQuery.extend( support, {
6566
pixelPosition: function() {
6667
computeStyleTests();

0 commit comments

Comments
 (0)