Fix bug in WebKitGTK+, backgroundRepeat return "wrong" values

This commit is contained in:
Guilherme Nascimento 2013-12-06 09:49:37 -02:00
parent 1d4b1753d6
commit 0b213eecef

View File

@ -250,6 +250,13 @@ _html2canvas.Util.getCSS = function (element, attribute, index) {
}
var value = computedCSS[attribute];
if(attribute==="backgroundRepeat" && value.indexOf(" ")!==-1){
value = (
"no-repeat repeat"===value ? "repeat-y" : (
"repeat no-repeat"===value ? "repeat-x" : value
)
);
}
if (/^background(Size|Position)$/.test(attribute)) {
return parseBackgroundSizePosition(value, element, attribute, index);