From 0b213eecef1941d1fa170c003429ed6f402d3928 Mon Sep 17 00:00:00 2001 From: Guilherme Nascimento Date: Fri, 6 Dec 2013 09:49:37 -0200 Subject: [PATCH] Fix bug in WebKitGTK+, backgroundRepeat return "wrong" values --- src/Core.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Core.js b/src/Core.js index f0121e2..044dec8 100644 --- a/src/Core.js +++ b/src/Core.js @@ -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); @@ -406,4 +413,4 @@ _html2canvas.Util.Children = function( elem ) { _html2canvas.Util.isTransparent = function(backgroundColor) { return (!backgroundColor || backgroundColor === "transparent" || backgroundColor === "rgba(0, 0, 0, 0)"); -}; \ No newline at end of file +};