"./core",
"./var/pnum",
"./core/access",
- "./css/var/rmargin",
"./var/document",
"./var/rcssNum",
"./css/var/rnumnonpx",
"./core/init",
"./core/ready",
"./selector" // contains
-], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand,
+], function( jQuery, pnum, access, document, rcssNum, rnumnonpx, cssExpand,
getStyles, swap, curCSS, adjustCSS, addGetHookIf, support ) {
"use strict";
}
};
- if ( !rmargin.test( prefix ) ) {
+ if ( prefix !== "margin" ) {
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
}
} );
define( [
"../core",
+ "./var/rboxStyle",
"./var/rnumnonpx",
- "./var/rmargin",
"./var/getStyles",
"./support",
"../selector" // Get jQuery.contains
-], function( jQuery, rnumnonpx, rmargin, getStyles, support ) {
+], function( jQuery, rboxStyle, rnumnonpx, getStyles, support ) {
"use strict";
// 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 ) ) {
+ if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
// Remember the original values
width = style.width;
// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
reliableMarginLeftVal = divStyle.marginLeft === "12px";
- // Support: Android 4.0 - 4.3 only
+ // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
// Some styles come back with percentage values, even though they shouldn't
- div.style.marginRight = "60%";
- pixelMarginRightVal = divStyle.marginRight === "36px";
+ div.style.right = "60%";
+ pixelBoxStylesVal = divStyle.right === "36px";
// Support: IE 9 - 11 only
// Detect misreporting of content dimensions for box-sizing:border-box elements
div = null;
}
- var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelMarginRightVal,
+ var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
reliableMarginLeftVal,
container = document.createElement( "div" ),
div = document.createElement( "div" );
computeStyleTests();
return boxSizingReliableVal;
},
- pixelPosition: function() {
+ pixelBoxStyles: function() {
computeStyleTests();
- return pixelPositionVal;
+ return pixelBoxStylesVal;
},
- pixelMarginRight: function() {
+ pixelPosition: function() {
computeStyleTests();
- return pixelMarginRightVal;
+ return pixelPositionVal;
},
reliableMarginLeft: function() {
computeStyleTests();
--- /dev/null
+define( [
+ "./cssExpand"
+], function( cssExpand ) {
+ "use strict";
+
+ return new RegExp( cssExpand.join( "|" ), "i" );
+} );
+++ /dev/null
-define( function() {
- "use strict";
-
- return ( /^margin/ );
-} );
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": true,
+ "pixelBoxStyles": true,
"pixelPosition": true,
"radioValue": true,
"reliableMarginLeft": true,
"focusin": true,
"noCloneChecked": false,
"optSelected": false,
- "pixelMarginRight": true,
+ "pixelBoxStyles": true,
"pixelPosition": true,
"radioValue": false,
"reliableMarginLeft": true,
"focusin": true,
"noCloneChecked": false,
"optSelected": false,
- "pixelMarginRight": true,
+ "pixelBoxStyles": true,
"pixelPosition": true,
"radioValue": false,
"reliableMarginLeft": true,
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": true,
+ "pixelBoxStyles": true,
"pixelPosition": true,
"radioValue": true,
"reliableMarginLeft": true,
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": true,
+ "pixelBoxStyles": false,
"pixelPosition": false,
"radioValue": true,
"reliableMarginLeft": true,
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": true,
+ "pixelBoxStyles": true,
"pixelPosition": true,
"radioValue": true,
"reliableMarginLeft": false,
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": true,
+ "pixelBoxStyles": false,
"pixelPosition": false,
"radioValue": true,
"reliableMarginLeft": true,
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": true,
+ "pixelBoxStyles": false,
"pixelPosition": false,
"radioValue": true,
"reliableMarginLeft": true,
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": true,
+ "pixelBoxStyles": false,
"pixelPosition": false,
"radioValue": true,
"reliableMarginLeft": true,
"focusin": false,
"noCloneChecked": true,
"optSelected": true,
- "pixelMarginRight": false,
+ "pixelBoxStyles": false,
"pixelPosition": false,
"radioValue": true,
"reliableMarginLeft": false,