Index: trunk/phase3/resources/jquery/jquery.js |
— | — | @@ -6447,6 +6447,7 @@ |
6448 | 6448 | rupper = /([A-Z]|^ms)/g, |
6449 | 6449 | rnumpx = /^-?\d+(?:px)?$/i, |
6450 | 6450 | rnum = /^-?\d/, |
| 6451 | + rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i, |
6451 | 6452 | rrelNum = /^([\-+])=([\-+.\de]+)/, |
6452 | 6453 | |
6453 | 6454 | cssShow = { position: "absolute", visibility: "hidden", display: "block" }, |
— | — | @@ -6794,6 +6795,12 @@ |
6795 | 6796 | if ( val < 0 || val == null ) { |
6796 | 6797 | val = elem.style[ name ] || 0; |
6797 | 6798 | } |
| 6799 | + |
| 6800 | + // Computed unit is not pixels. Stop here and return. |
| 6801 | + if ( rnumnonpx.test(val) ) { |
| 6802 | + return val; |
| 6803 | + } |
| 6804 | + |
6798 | 6805 | // Normalize "", auto, and prepare for extra |
6799 | 6806 | val = parseFloat( val ) || 0; |
6800 | 6807 | |