diff options
| author | 2021-02-03 19:17:50 -0500 | |
|---|---|---|
| committer | 2021-02-03 19:17:50 -0500 | |
| commit | 475d074fd74425efbe783fad08f97f2df0c4909f (patch) | |
| tree | 2acdae53999b3c74b716efa4edb5b40311fa356a /bower_components/jquery/src/css | |
| parent | cd502d52787f666fff3254d7d7e7578930c813c2 (diff) | |
| parent | 3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 (diff) | |
Update upstream source from tag 'upstream/8.1.2'
Update to upstream version '8.1.2'
with Debian dir e5e966a9e6010ef70618dc9a61558fa4db35aceb
Diffstat (limited to 'bower_components/jquery/src/css')
| -rw-r--r-- | bower_components/jquery/src/css/addGetHookIf.js | 24 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/adjustCSS.js | 65 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/curCSS.js | 137 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/defaultDisplay.js | 72 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/hiddenVisibleSelectors.js | 42 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/showHide.js | 45 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/support.js | 184 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/cssExpand.js | 3 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/isHidden.js | 16 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/rmargin.js | 3 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/rnumnonpx.js | 5 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/swap.js | 24 |
12 files changed, 0 insertions, 620 deletions
diff --git a/bower_components/jquery/src/css/addGetHookIf.js b/bower_components/jquery/src/css/addGetHookIf.js deleted file mode 100644 index 9cd21f6..0000000 --- a/bower_components/jquery/src/css/addGetHookIf.js +++ /dev/null @@ -1,24 +0,0 @@ -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; - 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/adjustCSS.js b/bower_components/jquery/src/css/adjustCSS.js deleted file mode 100644 index 48fcfec..0000000 --- a/bower_components/jquery/src/css/adjustCSS.js +++ /dev/null @@ -1,65 +0,0 @@ -define( [ - "../core", - "../var/rcssNum" -], function( jQuery, rcssNum ) { - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { return tween.cur(); } : - 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 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - 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"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // 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 - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - -return adjustCSS; -} ); diff --git a/bower_components/jquery/src/css/curCSS.js b/bower_components/jquery/src/css/curCSS.js deleted file mode 100644 index 40ea397..0000000 --- a/bower_components/jquery/src/css/curCSS.js +++ /dev/null @@ -1,137 +0,0 @@ -define( [ - "exports", - "../core", - "../var/documentElement", - "./var/rnumnonpx", - "./var/rmargin", - "./support", - "../selector" // contains -], function( exports, jQuery, documentElement, rnumnonpx, rmargin, support ) { - -var getStyles, curCSS, - rposition = /^(top|right|bottom|left)$/; - -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" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - - curCSS = function( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined; - - // Support: Opera 12.1x only - // Fall back to style even without computed - // computed is undefined for elems on document fragments - if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - if ( computed ) { - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" - // instead of "used value" for margin-right - // Safari 5.1.7 (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 ( !support.pixelMarginRight() && 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; - } - } - - // Support: IE - // IE returns zIndex value as an integer. - return ret === undefined ? - ret : - ret + ""; - }; -} else if ( documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, computed ) { - var left, rs, rsLeft, ret, - style = elem.style; - - computed = computed || getStyles( elem ); - ret = computed ? computed[ name ] : undefined; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are - // proportional to the parent element instead - // and we can't measure the parent instead because it - // might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - // Support: IE - // IE returns zIndex value as an integer. - return ret === undefined ? - ret : - ret + "" || "auto"; - }; -} - -exports.getStyles = getStyles; -exports.curCSS = curCSS; - -} ); diff --git a/bower_components/jquery/src/css/defaultDisplay.js b/bower_components/jquery/src/css/defaultDisplay.js deleted file mode 100644 index 2ec5d8a..0000000 --- a/bower_components/jquery/src/css/defaultDisplay.js +++ /dev/null @@ -1,72 +0,0 @@ -define( [ - "../core", - "../var/document", - "../manipulation" // appendTo -], function( jQuery, document ) { - -var iframe, - elemdisplay = { - - // Support: Firefox - // We have to pre-define these values for FF (#10227) - HTML: "block", - BODY: "block" - }; - -/** - * 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 elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - 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( "<iframe frameborder='0' width='0' height='0'/>" ) ) - .appendTo( doc.documentElement ); - - // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse - doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document; - - // Support: IE - doc.write(); - doc.close(); - - display = actualDisplay( nodeName, doc ); - iframe.detach(); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - } - - return display; -} - -return defaultDisplay; -} ); diff --git a/bower_components/jquery/src/css/hiddenVisibleSelectors.js b/bower_components/jquery/src/css/hiddenVisibleSelectors.js deleted file mode 100644 index e75ff5f..0000000 --- a/bower_components/jquery/src/css/hiddenVisibleSelectors.js +++ /dev/null @@ -1,42 +0,0 @@ -define( [ - "../core", - "../var/document", - "./support", - "../selector", - "../css" -], function( jQuery, document, support ) { - -function getDisplay( elem ) { - return elem.style && elem.style.display || jQuery.css( elem, "display" ); -} - -function filterHidden( elem ) { - - // Disconnected elements are considered hidden - if ( !jQuery.contains( elem.ownerDocument || document, elem ) ) { - return true; - } - while ( elem && elem.nodeType === 1 ) { - if ( getDisplay( elem ) === "none" || elem.type === "hidden" ) { - return true; - } - elem = elem.parentNode; - } - return false; -} - -jQuery.expr.filters.hidden = function( elem ) { - - // Support: Opera <= 12.12 - // Opera reports offsetWidths and offsetHeights less than zero on some elements - return support.reliableHiddenOffsets() ? - ( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 && - !elem.getClientRects().length ) : - filterHidden( elem ); -}; - -jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); -}; - -} ); diff --git a/bower_components/jquery/src/css/showHide.js b/bower_components/jquery/src/css/showHide.js deleted file mode 100644 index ebaef5f..0000000 --- a/bower_components/jquery/src/css/showHide.js +++ /dev/null @@ -1,45 +0,0 @@ -define( [], function() { -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - if ( display === "none" ) { - - // Restore a pre-hide() value if we have one - values[ index ] = jQuery._data( elem, "display" ) || ""; - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember the value we're replacing - jQuery._data( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -return showHide; - -} ); diff --git a/bower_components/jquery/src/css/support.js b/bower_components/jquery/src/css/support.js deleted file mode 100644 index 6509df2..0000000 --- a/bower_components/jquery/src/css/support.js +++ /dev/null @@ -1,184 +0,0 @@ -define( [ - "../core", - "../var/document", - "../var/documentElement", - "../var/support" -], function( jQuery, document, documentElement, support ) { - -( function() { - var pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal, - reliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - div.style.cssText = "float:left;opacity:.5"; - - // Support: IE<9 - // Make sure that element opacity exists (as opposed to filter) - support.opacity = div.style.opacity === "0.5"; - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - support.cssFloat = !!div.style.cssFloat; - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - container = document.createElement( "div" ); - container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + - "padding:0;margin-top:1px;position:absolute"; - div.innerHTML = ""; - container.appendChild( div ); - - // Support: Firefox<29, Android 2.3 - // Vendor-prefix box-sizing - support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" || - div.style.WebkitBoxSizing === ""; - - jQuery.extend( support, { - reliableHiddenOffsets: function() { - if ( pixelPositionVal == null ) { - computeStyleTests(); - } - return reliableHiddenOffsetsVal; - }, - - boxSizingReliable: function() { - - // We're checking for pixelPositionVal here instead of boxSizingReliableVal - // since that compresses better and they're computed together anyway. - if ( pixelPositionVal == null ) { - computeStyleTests(); - } - return boxSizingReliableVal; - }, - - pixelMarginRight: function() { - - // Support: Android 4.0-4.3 - if ( pixelPositionVal == null ) { - computeStyleTests(); - } - return pixelMarginRightVal; - }, - - pixelPosition: function() { - if ( pixelPositionVal == null ) { - computeStyleTests(); - } - return pixelPositionVal; - }, - - reliableMarginRight: function() { - - // Support: Android 2.3 - if ( pixelPositionVal == null ) { - computeStyleTests(); - } - return reliableMarginRightVal; - }, - - reliableMarginLeft: function() { - - // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37 - if ( pixelPositionVal == null ) { - computeStyleTests(); - } - return reliableMarginLeftVal; - } - } ); - - function computeStyleTests() { - var contents, divStyle, - documentElement = document.documentElement; - - // Setup - documentElement.appendChild( container ); - - div.style.cssText = - - // Support: Android 2.3 - // Vendor-prefix box-sizing - "-webkit-box-sizing:border-box;box-sizing:border-box;" + - "position:relative;display:block;" + - "margin:auto;border:1px;padding:1px;" + - "top:1%;width:50%"; - - // Support: IE<9 - // Assume reasonable values in the absence of getComputedStyle - pixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false; - pixelMarginRightVal = reliableMarginRightVal = true; - - // Check for getComputedStyle so that this code is not run in IE<9. - if ( window.getComputedStyle ) { - divStyle = window.getComputedStyle( div ); - pixelPositionVal = ( divStyle || {} ).top !== "1%"; - reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px"; - boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px"; - - // Support: Android 4.0 - 4.3 only - // Some styles come back with percentage values, even though they shouldn't - div.style.marginRight = "50%"; - pixelMarginRightVal = ( divStyle || { marginRight: "4px" } ).marginRight === "4px"; - - // Support: Android 2.3 only - // Div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container (#3333) - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - contents = div.appendChild( document.createElement( "div" ) ); - - // 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;-moz-box-sizing:content-box;" + - "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; - contents.style.marginRight = contents.style.width = "0"; - div.style.width = "1px"; - - reliableMarginRightVal = - !parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight ); - - div.removeChild( contents ); - } - - // Support: IE6-8 - // First check that getClientRects works as expected - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.style.display = "none"; - reliableHiddenOffsetsVal = div.getClientRects().length === 0; - if ( reliableHiddenOffsetsVal ) { - div.style.display = ""; - div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; - div.childNodes[ 0 ].style.borderCollapse = "separate"; - contents = div.getElementsByTagName( "td" ); - contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none"; - reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; - if ( reliableHiddenOffsetsVal ) { - contents[ 0 ].style.display = ""; - contents[ 1 ].style.display = "none"; - reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; - } - } - - // Teardown - documentElement.removeChild( container ); - } - -} )(); - -return support; - -} ); diff --git a/bower_components/jquery/src/css/var/cssExpand.js b/bower_components/jquery/src/css/var/cssExpand.js deleted file mode 100644 index 9f8194d..0000000 --- a/bower_components/jquery/src/css/var/cssExpand.js +++ /dev/null @@ -1,3 +0,0 @@ -define( function() { - return [ "Top", "Right", "Bottom", "Left" ]; -} ); diff --git a/bower_components/jquery/src/css/var/isHidden.js b/bower_components/jquery/src/css/var/isHidden.js deleted file mode 100644 index 7997eff..0000000 --- a/bower_components/jquery/src/css/var/isHidden.js +++ /dev/null @@ -1,16 +0,0 @@ -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 ); - }; -} ); diff --git a/bower_components/jquery/src/css/var/rmargin.js b/bower_components/jquery/src/css/var/rmargin.js deleted file mode 100644 index 9be2212..0000000 --- a/bower_components/jquery/src/css/var/rmargin.js +++ /dev/null @@ -1,3 +0,0 @@ -define( function() { - return ( /^margin/ ); -} ); diff --git a/bower_components/jquery/src/css/var/rnumnonpx.js b/bower_components/jquery/src/css/var/rnumnonpx.js deleted file mode 100644 index ed13f0b..0000000 --- a/bower_components/jquery/src/css/var/rnumnonpx.js +++ /dev/null @@ -1,5 +0,0 @@ -define( [ - "../../var/pnum" -], function( pnum ) { - return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); -} ); diff --git a/bower_components/jquery/src/css/var/swap.js b/bower_components/jquery/src/css/var/swap.js deleted file mode 100644 index b6d3b67..0000000 --- a/bower_components/jquery/src/css/var/swap.js +++ /dev/null @@ -1,24 +0,0 @@ -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; -}; - -} ); |
