Build: Update jscs and lint files

Ref 10fdad742a
Fixes gh-2056
This commit is contained in:
Oleg Gaidarenko
2015-09-03 02:52:01 +03:00
parent fa8a5a90e1
commit 20ddbe4f59
135 changed files with 8800 additions and 8027 deletions

View File

@@ -1,10 +1,12 @@
define(function() {
define( function() {
function addGetHookIf( conditionFn, hookFn ) {
// Define the hook, we'll check on the first run if it's really needed.
return {
get: function() {
if ( conditionFn() ) {
// Hook not needed (or it's not possible to use it due
// to missing dependency), remove it.
delete this.get;
@@ -12,11 +14,11 @@ function addGetHookIf( conditionFn, hookFn ) {
}
// Hook needed; redefine it so that the support test is not executed again.
return (this.get = hookFn).apply( this, arguments );
return ( this.get = hookFn ).apply( this, arguments );
}
};
}
return addGetHookIf;
});
} );

View File

@@ -1,4 +1,4 @@
define([
define( [
"../core",
"../var/rcssNum"
], function( jQuery, rcssNum ) {
@@ -12,11 +12,13 @@ function adjustCSS( elem, prop, valueParts, tween ) {
function() { return jQuery.css( elem, prop, "" ); },
initial = currentValue(),
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
// Starting value computation is required for potential unit mismatches
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
rcssNum.exec( jQuery.css( elem, prop ) );
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
@@ -27,6 +29,7 @@ function adjustCSS( elem, prop, valueParts, tween ) {
initialInUnit = +initial || 1;
do {
// If previous iteration zeroed out, double until we get *something*.
// Use string for doubling so we don't accidentally see scale as unchanged below
scale = scale || ".5";
@@ -38,12 +41,13 @@ function adjustCSS( elem, prop, valueParts, tween ) {
// Update scale, tolerating zero or NaN from tween.cur()
// Break the loop if scale is unchanged or perfect, or if we've just had enough.
} while (
scale !== (scale = currentValue() / initial) && scale !== 1 && --maxIterations
scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
);
}
if ( valueParts ) {
initialInUnit = +initialInUnit || +initial || 0;
// Apply relative offset (+=/-=) if specified
adjusted = valueParts[ 1 ] ?
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
@@ -58,4 +62,4 @@ function adjustCSS( elem, prop, valueParts, tween ) {
}
return adjustCSS;
});
} );

View File

@@ -1,4 +1,4 @@
define([
define( [
"exports",
"../core",
"../var/documentElement",
@@ -13,6 +13,7 @@ var getStyles, curCSS,
if ( window.getComputedStyle ) {
getStyles = function( elem ) {
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
@@ -120,4 +121,4 @@ if ( window.getComputedStyle ) {
exports.getStyles = getStyles;
exports.curCSS = curCSS;
});
} );

View File

@@ -1,4 +1,4 @@
define([
define( [
"../core",
"./support",
"../selector",
@@ -15,4 +15,4 @@ jQuery.expr.filters.visible = function( elem ) {
( ( elem.style && elem.style.display ) || jQuery.css( elem, "display" ) ) !== "none" );
};
});
} );

View File

@@ -1,4 +1,4 @@
define([], function() {
define( [], function() {
function showHide( elements, show ) {
var display, elem,
@@ -16,6 +16,7 @@ function showHide( elements, show ) {
display = elem.style.display;
if ( show ) {
if ( display === "none" ) {
// Restore a pre-hide() value if we have one
values[ index ] = jQuery._data( elem, "display" ) || "";
}
@@ -42,4 +43,4 @@ function showHide( elements, show ) {
return showHide;
});
} );

View File

@@ -1,11 +1,11 @@
define([
define( [
"../core",
"../var/document",
"../var/documentElement",
"../var/support"
], function( jQuery, document, documentElement, support ) {
(function() {
( function() {
var pixelPositionVal, boxSizingReliableVal, gBCRDimensionsVal,
pixelMarginRightVal, reliableHiddenOffsetsVal, reliableMarginRightVal,
container = document.createElement( "div" ),
@@ -36,7 +36,7 @@ define([
div.innerHTML = "";
container.appendChild( div );
jQuery.extend(support, {
jQuery.extend( support, {
reliableHiddenOffsets: function() {
if ( pixelPositionVal == null ) {
computeStyleTests();
@@ -45,6 +45,7 @@ define([
},
boxSizingReliable: function() {
// We're checking for pixelPositionVal here instead of boxSizingReliableVal
// since that compresses better and they're computed together anyway.
if ( pixelPositionVal == null ) {
@@ -61,6 +62,7 @@ define([
},
pixelMarginRight: function() {
// Support: Android 4.0-4.3
if ( pixelPositionVal == null ) {
computeStyleTests();
@@ -76,13 +78,14 @@ define([
},
reliableMarginRight: function() {
// Support: Android 2.3
if ( pixelPositionVal == null ) {
computeStyleTests();
}
return reliableMarginRightVal;
}
});
} );
function computeStyleTests() {
var contents, divStyle,
@@ -92,6 +95,7 @@ define([
documentElement.appendChild( container );
div.style.cssText =
// Support: Android 2.3
// Vendor-prefix box-sizing
"-webkit-box-sizing:border-box;box-sizing:border-box;" +
@@ -124,6 +128,7 @@ define([
// Reset CSS: box-sizing; display; margin; border; padding
contents.style.cssText = div.style.cssText =
// Support: Android 2.3
// Vendor-prefix box-sizing
"-webkit-box-sizing:content-box;box-sizing:content-box;" +
@@ -158,8 +163,8 @@ define([
documentElement.removeChild( container );
}
})();
} )();
return support;
});
} );

View File

@@ -1,3 +1,3 @@
define(function() {
define( function() {
return [ "Top", "Right", "Bottom", "Left" ];
});
} );

View File

@@ -1,14 +1,16 @@
define([
define( [
"../../core",
"../../selector"
// css is assumed
], function( jQuery ) {
return function( elem, el ) {
// isHidden might be called from jQuery#filter function;
// in that case, element will be second argument
elem = el || elem;
return jQuery.css( elem, "display" ) === "none" ||
!jQuery.contains( elem.ownerDocument, elem );
};
});
} );

View File

@@ -1,3 +1,3 @@
define(function() {
return (/^margin/);
});
define( function() {
return ( /^margin/ );
} );

View File

@@ -1,5 +1,5 @@
define([
define( [
"../../var/pnum"
], function( pnum ) {
return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
});
} );

View File

@@ -1,4 +1,4 @@
define(function() {
define( function() {
// A method for quickly swapping in/out CSS properties to get correct calculations.
return function( elem, options, callback, args ) {
@@ -21,4 +21,4 @@ return function( elem, options, callback, args ) {
return ret;
};
});
} );