From d0e795705b4148903afbb59ea17481c1c0123fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Thu, 30 May 2013 11:26:50 +0200 Subject: [PATCH] WebKit NativeMML: only apply lspace/rspace in non-embellised mrow and set them to 0 otherwise. --- unpacked/jax/output/NativeMML/jax.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index 5935e5020..f6fa1e5cb 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -1127,14 +1127,17 @@ // constant values instead. So let's modify the CSS properties here. // - // - // 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; - if (nMML.NAMEDSPACE[lspace]) {lspace = nMML.NAMEDSPACE[lspace]} - if (nMML.NAMEDSPACE[rspace]) {rspace = nMML.NAMEDSPACE[rspace]} + 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"); + 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.