WebKit NativeMML: only apply lspace/rspace in non-embellised mrow and set them to 0 otherwise.

This commit is contained in:
Frédéric Wang 2013-05-30 11:26:50 +02:00
parent 93065ef055
commit d0e795705b

View File

@ -1127,14 +1127,17 @@
// constant values instead. So let's modify the CSS properties here.
//
var lspace = 0, rspace = 0, p = this.parent;
if (p && p.type === "mrow" && (p.inferred || !p.isEmbellished())) {
//
// Retrieve the values of lspace/rspace and convert named spaces.
// Other values (except unitless) will be parsed by the CSS engine.
//
var values = this.getValues("lspace", "rspace");
var lspace = values.lspace, rspace = values.rspace;
lspace = values.lspace, rspace = values.rspace;
if (nMML.NAMEDSPACE[lspace]) {lspace = nMML.NAMEDSPACE[lspace]}
if (nMML.NAMEDSPACE[rspace]) {rspace = nMML.NAMEDSPACE[rspace]}
}
//
// Now update -webkit-margin-start and -webkit-margin-end.