few bug fixes to getCSS and unit tests

This commit is contained in:
Niklas von Hertzen
2012-03-04 21:16:18 +02:00
parent c018166563
commit 7a3ca77471
4 changed files with 29 additions and 13 deletions

View File

@ -144,7 +144,8 @@ _html2canvas.Preload = function( options ) {
// TODO add multi image background support
if (background_image.substring(0,7) === "-webkit" || background_image.substring(0,3) === "-o-" || background_image.substring(0,4) === "-moz") {
if (!/^(-webkit|-o|-moz|-ms|linear)-/.test( src )) {
// if (background_image.substring(0,7) === "-webkit" || background_image.substring(0,3) === "-o-" || background_image.substring(0,4) === "-moz") {
img = _html2canvas.Generate.Gradient( background_image, _html2canvas.Util.Bounds( el ) );
@ -210,10 +211,10 @@ _html2canvas.Preload = function( options ) {
};
// TODO Opera has no load/error event for SVG images
// TODO Opera has no load/error event for SVG images
// Opera ninja onload's cached images
/*
// Opera ninja onload's cached images
/*
window.setTimeout(function(){
if ( img.width !== 0 && imageObj.succeeded === undefined ) {
img.onload();