Skip to content

Commit

Permalink
Handle padding in measured children when noReflows is used (e.g., in …
Browse files Browse the repository at this point in the history
…maction tags around operators).
  • Loading branch information
dpvc committed Feb 17, 2015
1 parent 49c3e3a commit fe0d977
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion unpacked/jax/output/HTML-CSS/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -892,8 +892,14 @@
return HD;
},
getW: function (span) {
if (span.bbox && this.config.noReflows && span.bbox.exactW !== false) {return span.bbox.w}
var W, H, w = (span.bbox||{}).w, start = span;
if (span.bbox && this.config.noReflows && span.bbox.exactW !== false) {
if (!span.bbox.exactW) {
if (span.style.paddingLeft) w += this.unEm(span.style.paddingLeft)*(span.scale||1);
if (span.style.paddingRight) w += this.unEm(span.style.paddingRight)*(span.scale||1);
}
return w;
}
if (span.bbox && span.bbox.exactW) {return w}
if ((span.bbox && w >= 0 && !this.initialSkipBug && !this.msieItalicWidthBug) ||
this.negativeBBoxes || !span.firstChild) {
Expand Down

0 comments on commit fe0d977

Please sign in to comment.