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