From 918b2a49ca6ac074bac47f6685cf3a687a4c6212 Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Sat, 1 Nov 2014 21:05:20 -0400 Subject: 3.2.0 -> 3.3.0 --- bower_components/jquery/src/css/addGetHookIf.js | 24 ++++++ bower_components/jquery/src/css/curCSS.js | 57 ++++++++++++++ bower_components/jquery/src/css/defaultDisplay.js | 70 +++++++++++++++++ .../jquery/src/css/hiddenVisibleSelectors.js | 15 ++++ bower_components/jquery/src/css/support.js | 91 ++++++++++++++++++++++ bower_components/jquery/src/css/swap.js | 28 +++++++ bower_components/jquery/src/css/var/cssExpand.js | 3 + bower_components/jquery/src/css/var/getStyles.js | 5 ++ bower_components/jquery/src/css/var/isHidden.js | 13 ++++ bower_components/jquery/src/css/var/rmargin.js | 3 + bower_components/jquery/src/css/var/rnumnonpx.js | 5 ++ 11 files changed, 314 insertions(+) create mode 100644 bower_components/jquery/src/css/addGetHookIf.js create mode 100644 bower_components/jquery/src/css/curCSS.js create mode 100644 bower_components/jquery/src/css/defaultDisplay.js create mode 100644 bower_components/jquery/src/css/hiddenVisibleSelectors.js create mode 100644 bower_components/jquery/src/css/support.js create mode 100644 bower_components/jquery/src/css/swap.js create mode 100644 bower_components/jquery/src/css/var/cssExpand.js create mode 100644 bower_components/jquery/src/css/var/getStyles.js create mode 100644 bower_components/jquery/src/css/var/isHidden.js create mode 100644 bower_components/jquery/src/css/var/rmargin.js create mode 100644 bower_components/jquery/src/css/var/rnumnonpx.js (limited to 'bower_components/jquery/src/css') diff --git a/bower_components/jquery/src/css/addGetHookIf.js b/bower_components/jquery/src/css/addGetHookIf.js new file mode 100644 index 00000000..81d694cb --- /dev/null +++ b/bower_components/jquery/src/css/addGetHookIf.js @@ -0,0 +1,24 @@ +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. + // Since there are no other hooks for marginRight, remove the whole object. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + + return (this.get = hookFn).apply( this, arguments ); + } + }; +} + +return addGetHookIf; + +}); diff --git a/bower_components/jquery/src/css/curCSS.js b/bower_components/jquery/src/css/curCSS.js new file mode 100644 index 00000000..abcc8cb7 --- /dev/null +++ b/bower_components/jquery/src/css/curCSS.js @@ -0,0 +1,57 @@ +define([ + "../core", + "./var/rnumnonpx", + "./var/rmargin", + "./var/getStyles", + "../selector" // contains +], function( jQuery, rnumnonpx, rmargin, getStyles ) { + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + style = elem.style; + + computed = computed || getStyles( elem ); + + // Support: IE9 + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + } + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // Support: iOS < 6 + // A tribute to the "awesome hack by Dean Edwards" + // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + // Support: IE + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + +return curCSS; +}); diff --git a/bower_components/jquery/src/css/defaultDisplay.js b/bower_components/jquery/src/css/defaultDisplay.js new file mode 100644 index 00000000..631b9ba8 --- /dev/null +++ b/bower_components/jquery/src/css/defaultDisplay.js @@ -0,0 +1,70 @@ +define([ + "../core", + "../manipulation" // appendTo +], function( jQuery ) { + +var iframe, + elemdisplay = {}; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optmization) until something better comes along, + // since it was removed from specification and supported only in FF + style.display : jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = (iframe || jQuery( "