commit d0e795705b4148903afbb59ea17481c1c0123fdd
parent 93065ef0557910fdd30fabf7fa712ed7498f5110
Author: Frédéric Wang <fred.wang@free.fr>
Date: Thu, 30 May 2013 11:26:50 +0200
WebKit NativeMML: only apply lspace/rspace in non-embellised mrow and set them to 0 otherwise.
Diffstat:
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git 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.