Here is a test case from the MathML testsuite:
Note that to workaround this bug, MathJax attaches the corresponding style="width: ..." on the mtable element. Hence an easy way to fix this bug would be to do this attribute mapping in src/content/mathml/content/src/nsMathMLElement.cpp. Note the special value "auto" and the case when length is unitless (it should be interpreted in the same way as a % per chapter 2).
Good new, we don't have to care about mstyle:
"MathML specifies that when the attributes height, depth or width are specified on an mstyle element, they apply only to mspace elements, and not to the corresponding attributes of mglyph, mpadded, or mtable."
Here is a reftest I wrote for the MathJax project:
(one can also compare the effect of the attribute width with the one of the corresponding style="width: ..." rule)
Created attachment 599666 [details] [diff] [review]
> Here is a reftest I wrote for the MathJax project:
> (one can also compare the effect of the attribute width with the one of the
> corresponding style="width: ..." rule)
The reference in this reftest does not work very well for us, because of bug 459363. So maybe we should just compare
<mtable style="width: ...;">...
We can also verify that "auto" is the same as the default value:
(I think in attachment 599666 [details] [diff] [review], ParseNumericValue will just ignore "auto" and thus provide the expected behavior here).
Created attachment 600810 [details] [diff] [review]
Patch reftests V1
Sorry about the name mangling...
Updated by Frédéric: https://developer.mozilla.org/en/Mozilla_MathML_Project/MathML3Testsuite/Topics/TablesTokens