The regular expression for mpadded attributes in MathML 3.0 First Edition required units, but this was inconsistent with what was implied in the text.
The editor's draft for the Second Edition has now updated the regular expression to allow unitless values, which is what was intended and is consistent with the text.
Bug 677036 removed the special case for "0" in mpadded attributes, so that part of this bug is a regression. Other unitless values have not been previously supported in Gecko.
I think we should really only support unitless "0" as in CSS:
See my comment here:
Created attachment 626941 [details] [diff] [review]
This patch should restore support for the "0" case and treats other unitless values as a multiple of the base size.
Comment on attachment 626941 [details] [diff] [review]
It probably doesn't make any difference in practice, but it would be more consistent to use SetFloatValue(floatValue, eCSSUnit_Number).
I'm also happy if you only restore the "0" until the MathML WG makes a decision.
You made some good points against unitless values, but my guess is that they are unlikely to make a change if the intention was to allow unitless values.
Created attachment 627186 [details] [diff] [review]
A note on this topic has been added to
We probably don't need more docs here (see bug 677036#c30 ff).