diff options
Diffstat (limited to 'libs/bower_components/jquery/src/css/var')
6 files changed, 52 insertions, 10 deletions
diff --git a/libs/bower_components/jquery/src/css/var/cssExpand.js b/libs/bower_components/jquery/src/css/var/cssExpand.js index 91e90a88a0..9f8194dc88 100644 --- a/libs/bower_components/jquery/src/css/var/cssExpand.js +++ b/libs/bower_components/jquery/src/css/var/cssExpand.js @@ -1,3 +1,3 @@ -define(function() { +define( function() { return [ "Top", "Right", "Bottom", "Left" ]; -}); +} ); diff --git a/libs/bower_components/jquery/src/css/var/getStyles.js b/libs/bower_components/jquery/src/css/var/getStyles.js new file mode 100644 index 0000000000..02a4b8194e --- /dev/null +++ b/libs/bower_components/jquery/src/css/var/getStyles.js @@ -0,0 +1,15 @@ +define( function() { + return 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" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; +} ); diff --git a/libs/bower_components/jquery/src/css/var/isHidden.js b/libs/bower_components/jquery/src/css/var/isHidden.js index 15ab81a979..7997efff18 100644 --- a/libs/bower_components/jquery/src/css/var/isHidden.js +++ b/libs/bower_components/jquery/src/css/var/isHidden.js @@ -1,13 +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 ); + return jQuery.css( elem, "display" ) === "none" || + !jQuery.contains( elem.ownerDocument, elem ); }; -}); +} ); diff --git a/libs/bower_components/jquery/src/css/var/rmargin.js b/libs/bower_components/jquery/src/css/var/rmargin.js index da0438db67..9be2212435 100644 --- a/libs/bower_components/jquery/src/css/var/rmargin.js +++ b/libs/bower_components/jquery/src/css/var/rmargin.js @@ -1,3 +1,3 @@ -define(function() { - return (/^margin/); -}); +define( function() { + return ( /^margin/ ); +} ); diff --git a/libs/bower_components/jquery/src/css/var/rnumnonpx.js b/libs/bower_components/jquery/src/css/var/rnumnonpx.js index c93be28506..ed13f0b985 100644 --- a/libs/bower_components/jquery/src/css/var/rnumnonpx.js +++ b/libs/bower_components/jquery/src/css/var/rnumnonpx.js @@ -1,5 +1,5 @@ -define([ +define( [ "../../var/pnum" ], function( pnum ) { return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); -}); +} ); diff --git a/libs/bower_components/jquery/src/css/var/swap.js b/libs/bower_components/jquery/src/css/var/swap.js new file mode 100644 index 0000000000..b6d3b679f9 --- /dev/null +++ b/libs/bower_components/jquery/src/css/var/swap.js @@ -0,0 +1,24 @@ +define( function() { + +// A method for quickly swapping in/out CSS properties to get correct calculations. +return function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + +} ); |