/bower_components/jquery/src/css/curCSS.js |
@@ -1,14 +1,11 @@ |
define( [ |
define([ |
"../core", |
"./var/rnumnonpx", |
"./var/rmargin", |
"./var/getStyles", |
"./support", |
"../selector" // Get jQuery.contains |
], function( jQuery, rnumnonpx, rmargin, getStyles, support ) { |
"../selector" // contains |
], function( jQuery, rnumnonpx, rmargin, getStyles ) { |
|
"use strict"; |
|
function curCSS( elem, name, computed ) { |
var width, minWidth, maxWidth, ret, |
style = elem.style; |
@@ -15,21 +12,23 @@ |
|
computed = computed || getStyles( elem ); |
|
// Support: IE <=9 only |
// Support: IE9 |
// getPropertyValue is only needed for .css('filter') (#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" |
// Android Browser returns percentage for some values, |
// but width seems to be reliably pixels. |
// This is against the CSSOM draft spec: |
// https://drafts.csswg.org/cssom/#resolved-values |
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { |
// 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; |
@@ -48,8 +47,7 @@ |
} |
|
return ret !== undefined ? |
|
// Support: IE <=9 - 11 only |
// Support: IE |
// IE returns zIndex value as an integer. |
ret + "" : |
ret; |
@@ -56,4 +54,4 @@ |
} |
|
return curCSS; |
} ); |
}); |
/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 optimization) 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( "<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 ].contentDocument; |
|
// Support: IE |
doc.write(); |
doc.close(); |
|
display = actualDisplay( nodeName, doc ); |
iframe.detach(); |
} |
|
// Store the correct default display |
elemdisplay[ nodeName ] = display; |
} |
|
return display; |
} |
|
return defaultDisplay; |
|
}); |
/bower_components/jquery/src/css/support.js |
@@ -1,89 +1,96 @@ |
define( [ |
define([ |
"../core", |
"../var/document", |
"../var/documentElement", |
"../var/support" |
], function( jQuery, document, documentElement, support ) { |
], function( jQuery, support ) { |
|
"use strict"; |
(function() { |
var pixelPositionVal, boxSizingReliableVal, |
docElem = document.documentElement, |
container = document.createElement( "div" ), |
div = document.createElement( "div" ); |
|
( function() { |
if ( !div.style ) { |
return; |
} |
|
// Support: IE9-11+ |
// 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:0;height:0;top:0;left:-9999px;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. |
function computeStyleTests() { |
|
// This is a singleton, we need to execute it only once |
if ( !div ) { |
return; |
} |
|
function computePixelPositionAndBoxSizingReliable() { |
div.style.cssText = |
"box-sizing:border-box;" + |
"position:relative;display:block;" + |
"margin:auto;border:1px;padding:1px;" + |
"top:1%;width:50%"; |
// Support: Firefox<29, Android 2.3 |
// Vendor-prefix box-sizing |
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + |
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" + |
"border:1px;padding:1px;width:4px;position:absolute"; |
div.innerHTML = ""; |
documentElement.appendChild( container ); |
docElem.appendChild( container ); |
|
var divStyle = window.getComputedStyle( div ); |
var divStyle = window.getComputedStyle( div, null ); |
pixelPositionVal = divStyle.top !== "1%"; |
|
// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 |
reliableMarginLeftVal = divStyle.marginLeft === "2px"; |
boxSizingReliableVal = divStyle.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"; |
docElem.removeChild( container ); |
} |
|
documentElement.removeChild( container ); |
// Support: node.js jsdom |
// Don't assume that getComputedStyle is a property of the global object |
if ( window.getComputedStyle ) { |
jQuery.extend( support, { |
pixelPosition: function() { |
|
// Nullify the div so it wouldn't be stored in the memory and |
// it will also be a sign that checks already performed |
div = null; |
} |
// This test is executed only once but we still do memoizing |
// since we can use the boxSizingReliable pre-computing. |
// No need to check if the test was already performed, though. |
computePixelPositionAndBoxSizingReliable(); |
return pixelPositionVal; |
}, |
boxSizingReliable: function() { |
if ( boxSizingReliableVal == null ) { |
computePixelPositionAndBoxSizingReliable(); |
} |
return boxSizingReliableVal; |
}, |
reliableMarginRight: function() { |
|
var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, |
container = document.createElement( "div" ), |
div = document.createElement( "div" ); |
// Support: Android 2.3 |
// Check if 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 |
// This support function is only executed once so no memoizing is needed. |
var ret, |
marginDiv = div.appendChild( document.createElement( "div" ) ); |
|
// Finish early in limited (non-browser) environments |
if ( !div.style ) { |
return; |
} |
// Reset CSS: box-sizing; display; margin; border; padding |
marginDiv.style.cssText = div.style.cssText = |
// Support: Firefox<29, 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"; |
marginDiv.style.marginRight = marginDiv.style.width = "0"; |
div.style.width = "1px"; |
docElem.appendChild( container ); |
|
// 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"; |
ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight ); |
|
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + |
"padding:0;margin-top:1px;position:absolute"; |
container.appendChild( div ); |
docElem.removeChild( container ); |
div.removeChild( marginDiv ); |
|
jQuery.extend( support, { |
pixelPosition: function() { |
computeStyleTests(); |
return pixelPositionVal; |
}, |
boxSizingReliable: function() { |
computeStyleTests(); |
return boxSizingReliableVal; |
}, |
pixelMarginRight: function() { |
computeStyleTests(); |
return pixelMarginRightVal; |
}, |
reliableMarginLeft: function() { |
computeStyleTests(); |
return reliableMarginLeftVal; |
} |
} ); |
} )(); |
return ret; |
} |
}); |
} |
})(); |
|
return support; |
|
} ); |
}); |