Incorrect widths of math elements in Gecko
Created by: fred-wang
Follow-up of Peter's report on the dev list, there are issues with width of math elements in Gecko. MML.math has the following block:
if (nMML.widthBug && !mtable.nMMLforceWidth && mtable.nMMLlaMatch))) {
//
// Convert size to ex's so that it scales properly if the print media
// has a different font size.
//
parent.style.width = (math.firstChild.scrollWidth/nMML.ex).toFixed(3) + "ex";
}
As I read it, this will not be executed if there is not any mtable. I think we disabled the correction when we added the mlabeldtr workaround in https://github.com/mathjax/MathJax/commit/0891402#L5L621 (issue #356 (closed)). The condition should probably be:
nMML.widthBug && !(mtable.nMMLhasLabels && (mtable.nMMLforceWidth || !mtable.nMMLlaMatch))
But then this gives too large widths. It seems to be due to the conversion to ex which was introduced in https://github.com/mathjax/MathJax/commit/debc24047f25cf546876cf8baffe914736d5af38#L3L618 (issue #386 (closed))