Merge pull request #130 from CyberShadow/opera-fixes

Opera performance fixes
This commit is contained in:
Niklas von Hertzen 2012-10-22 04:33:37 -07:00
commit e83de7ae00

View File

@ -285,7 +285,7 @@ _html2canvas.Parse = function ( images, options ) {
text_align = text_align.replace(["-webkit-auto"],["auto"]);
if (options.letterRendering === false && /^(left|right|justify|auto)$/.test(text_align) && /^(normal|none)$/.test(letter_spacing)){
if (options.letterRendering === false && /^(left|right|justify|auto)$/.test(text_align) && /^(normal|none|0px)$/.test(letter_spacing)){
// this.setContextVariable(ctx,"textAlign",text_align);
renderList = textNode.nodeValue.split(/(\b| )/);
@ -363,7 +363,10 @@ _html2canvas.Parse = function ( images, options ) {
continue;
}
if (i < listLen-1)
newTextNode = oldTextNode.splitText(renderList[c].length);
else
newTextNode = null;
parent = oldTextNode.parentNode;
wrapElement = doc.createElement('wrapper');