Revert fb4445070c
which is no longer necessary with the release of Opera 11. Fixes #7608.
This commit is contained in:
parent
fcf623786a
commit
012f0c3b4b
17
src/css.js
17
src/css.js
|
@ -12,9 +12,6 @@ var ralpha = /alpha\([^)]*\)/i,
|
||||||
cssHeight = [ "Top", "Bottom" ],
|
cssHeight = [ "Top", "Bottom" ],
|
||||||
curCSS,
|
curCSS,
|
||||||
|
|
||||||
getComputedStyle,
|
|
||||||
currentStyle,
|
|
||||||
|
|
||||||
fcamelCase = function( all, letter ) {
|
fcamelCase = function( all, letter ) {
|
||||||
return letter.toUpperCase();
|
return letter.toUpperCase();
|
||||||
};
|
};
|
||||||
|
@ -172,10 +169,6 @@ jQuery.each(["height", "width"], function( i, name ) {
|
||||||
if ( val <= 0 ) {
|
if ( val <= 0 ) {
|
||||||
val = curCSS( elem, name, name );
|
val = curCSS( elem, name, name );
|
||||||
|
|
||||||
if ( val === "0px" && currentStyle ) {
|
|
||||||
val = currentStyle( elem, name, name );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( val != null ) {
|
if ( val != null ) {
|
||||||
// Should return "auto" instead of 0, use 0 for
|
// Should return "auto" instead of 0, use 0 for
|
||||||
// temporary backwards-compat
|
// temporary backwards-compat
|
||||||
|
@ -241,7 +234,7 @@ if ( !jQuery.support.opacity ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
||||||
getComputedStyle = function( elem, newName, name ) {
|
curCSS = function( elem, newName, name ) {
|
||||||
var ret, defaultView, computedStyle;
|
var ret, defaultView, computedStyle;
|
||||||
|
|
||||||
name = name.replace( rupper, "-$1" ).toLowerCase();
|
name = name.replace( rupper, "-$1" ).toLowerCase();
|
||||||
|
@ -259,10 +252,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
}
|
} else if ( document.documentElement.currentStyle ) {
|
||||||
|
curCSS = function( elem, name ) {
|
||||||
if ( document.documentElement.currentStyle ) {
|
|
||||||
currentStyle = function( elem, name ) {
|
|
||||||
var left, rsLeft,
|
var left, rsLeft,
|
||||||
ret = elem.currentStyle && elem.currentStyle[ name ],
|
ret = elem.currentStyle && elem.currentStyle[ name ],
|
||||||
style = elem.style;
|
style = elem.style;
|
||||||
|
@ -291,8 +282,6 @@ if ( document.documentElement.currentStyle ) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
curCSS = getComputedStyle || currentStyle;
|
|
||||||
|
|
||||||
function getWH( elem, name, extra ) {
|
function getWH( elem, name, extra ) {
|
||||||
var which = name === "width" ? cssWidth : cssHeight,
|
var which = name === "width" ? cssWidth : cssHeight,
|
||||||
val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
|
val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
|
||||||
|
|
Loading…
Reference in a new issue