remove legacy code

This commit is contained in:
Niklas von Hertzen 2013-01-11 20:38:33 +02:00
parent 9b0c32c62c
commit 222dfa84b7

View File

@ -196,7 +196,6 @@ _html2canvas.Util.getCSS = function (el, attribute, index) {
return val;
}
if ( window.getComputedStyle ) {
if (previousElement !== el) {
computedCSS = document.defaultView.getComputedStyle(el, null);
}
@ -234,31 +233,6 @@ _html2canvas.Util.getCSS = function (el, attribute, index) {
val = arr;
}
} else if ( el.currentStyle ) {
// IE 9>
if ( isBackgroundSizePosition ) {
// Older IE uses -x and -y
val = [ toPX( attribute + "X", el.currentStyle[ attribute + "X" ] ), toPX( attribute + "Y", el.currentStyle[ attribute + "Y" ] ) ];
} else {
val = toPX( attribute, el.currentStyle[ attribute ] );
if (/^(border)/i.test( attribute ) && /^(medium|thin|thick)$/i.test( val )) {
switch (val) {
case "thin":
val = "1px";
break;
case "medium":
val = "0px"; // this is wrong, it should be 3px but IE uses medium for no border as well.. TODO find a work around
break;
case "thick":
val = "5px";
break;
}
}
}
}
return val;
};