Make lspace and voffset handle bad unit better

This commit is contained in:
Davide P. Cervone 2012-02-07 11:59:43 -05:00
parent 49e7bc5e9e
commit 6e8ff20e07
8 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2140,7 +2140,7 @@
HTMLlength2em: function (span,length,mu,d,m) { HTMLlength2em: function (span,length,mu,d,m) {
if (m == null) {m = -HTMLCSS.BIGDIMEN} if (m == null) {m = -HTMLCSS.BIGDIMEN}
var match = String(length).match(/width|height|depth/); var match = String(length).match(/width|height|depth/);
var size = (match ? span.bbox[match[0].charAt(0)] : (d ? span.bbox[d] : null)); var size = (match ? span.bbox[match[0].charAt(0)] : (d ? span.bbox[d] : 0));
var v = HTMLCSS.length2em(length,mu,size); var v = HTMLCSS.length2em(length,mu,size);
if (d && String(length).match(/^\s*[-+]/)) if (d && String(length).match(/^\s*[-+]/))
{return Math.max(m,span.bbox[d]+v)} else {return v} {return Math.max(m,span.bbox[d]+v)} else {return v}