| 6688 | }; |
| 6689 | |
| 6690 | function setPositiveNumber( _elem, value, subtract ) { |
| 6691 | |
| 6692 | // Any relative (+/-) values have already been |
| 6693 | // normalized at this point |
| 6694 | var matches = rcssNum.exec( value ); |
| 6695 | return matches ? |
| 6696 | |
| 6697 | // Guard against undefined "subtract", e.g., when used as in cssHooks |
| 6698 | Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : |
| 6699 | value; |
| 6700 | } |
| 6701 | |
| 6702 | function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { |
| 6703 | var i = dimension === "width" ? 1 : 0, |