@@ 6724-6763 (lines=40) @@ | ||
6721 | }; |
|
6722 | } |
|
6723 | ||
6724 | if ( document.documentElement.currentStyle ) { |
|
6725 | currentStyle = function( elem, name ) { |
|
6726 | var left, rsLeft, uncomputed, |
|
6727 | ret = elem.currentStyle && elem.currentStyle[ name ], |
|
6728 | style = elem.style; |
|
6729 | ||
6730 | // Avoid setting ret to empty string here |
|
6731 | // so we don't default to auto |
|
6732 | if ( ret === null && style && (uncomputed = style[ name ]) ) { |
|
6733 | ret = uncomputed; |
|
6734 | } |
|
6735 | ||
6736 | // From the awesome hack by Dean Edwards |
|
6737 | // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 |
|
6738 | ||
6739 | // If we're not dealing with a regular pixel number |
|
6740 | // but a number that has a weird ending, we need to convert it to pixels |
|
6741 | if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { |
|
6742 | ||
6743 | // Remember the original values |
|
6744 | left = style.left; |
|
6745 | rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; |
|
6746 | ||
6747 | // Put in the new values to get a computed value out |
|
6748 | if ( rsLeft ) { |
|
6749 | elem.runtimeStyle.left = elem.currentStyle.left; |
|
6750 | } |
|
6751 | style.left = name === "fontSize" ? "1em" : ( ret || 0 ); |
|
6752 | ret = style.pixelLeft + "px"; |
|
6753 | ||
6754 | // Revert the changed values |
|
6755 | style.left = left; |
|
6756 | if ( rsLeft ) { |
|
6757 | elem.runtimeStyle.left = rsLeft; |
|
6758 | } |
|
6759 | } |
|
6760 | ||
6761 | return ret === "" ? "auto" : ret; |
|
6762 | }; |
|
6763 | } |
|
6764 | ||
6765 | curCSS = getComputedStyle || currentStyle; |
|
6766 |
@@ 5911-5943 (lines=33) @@ | ||
5908 | }; |
|
5909 | } |
|
5910 | ||
5911 | if ( document.documentElement.currentStyle ) { |
|
5912 | currentStyle = function( elem, name ) { |
|
5913 | var left, |
|
5914 | ret = elem.currentStyle && elem.currentStyle[ name ], |
|
5915 | rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ], |
|
5916 | style = elem.style; |
|
5917 | ||
5918 | // From the awesome hack by Dean Edwards |
|
5919 | // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 |
|
5920 | ||
5921 | // If we're not dealing with a regular pixel number |
|
5922 | // but a number that has a weird ending, we need to convert it to pixels |
|
5923 | if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { |
|
5924 | // Remember the original values |
|
5925 | left = style.left; |
|
5926 | ||
5927 | // Put in the new values to get a computed value out |
|
5928 | if ( rsLeft ) { |
|
5929 | elem.runtimeStyle.left = elem.currentStyle.left; |
|
5930 | } |
|
5931 | style.left = name === "fontSize" ? "1em" : (ret || 0); |
|
5932 | ret = style.pixelLeft + "px"; |
|
5933 | ||
5934 | // Revert the changed values |
|
5935 | style.left = left; |
|
5936 | if ( rsLeft ) { |
|
5937 | elem.runtimeStyle.left = rsLeft; |
|
5938 | } |
|
5939 | } |
|
5940 | ||
5941 | return ret === "" ? "auto" : ret; |
|
5942 | }; |
|
5943 | } |
|
5944 | ||
5945 | curCSS = getComputedStyle || currentStyle; |
|
5946 |