aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2016-04-23 22:06:52 -0400
committerRichard Gibson <richard.gibson@gmail.com>2016-04-23 22:14:25 -0400
commitcf1497a58cd088d3f293d655803d230ee4cc4c07 (patch)
tree8825b7d0ed482aeca328578f507d6f95e852a775 /src
parenta51cb2596551f12448ae1659f1ebce29607a94d8 (diff)
downloadjquery-cf1497a58cd088d3f293d655803d230ee4cc4c07.tar.gz
jquery-cf1497a58cd088d3f293d655803d230ee4cc4c07.zip
Build: A more modest block-level function proposal
This reverts commit fa610da68440530e73bba296a1f982f94dfeac99.
Diffstat (limited to 'src')
-rw-r--r--src/css/support.js37
1 files changed, 19 insertions, 18 deletions
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();