Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None| DevTrial on desktop | 140 |
| DevTrial on Android | 140 |
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68ee55b8.050a0220.2a8282.0245.GAE%40google.com.
Hi,
Hmmm how does it know whether to mirror or not to mirror? And what will be mirrored?Is there an example/demo of failure, success and fix-dependent success renderings?
First note that right-to-left layout of MathML formulas as well
as text mirroring inside MathML formulas is already supported. For
example Chromium lays out the following formula from right-to-left
and mirrors summation, "element of" and right/left fences (but not
the rest of the text):
<!DOCTYPE html>
<meta charset="utf-8"/>
<link rel="stylesheet"
href="https://fred-wang.github.io/MathFonts/XITS/mathfonts.css">
<math dir="rtl" display="block">
<mrow>
<munderover>
<mo largeop="false">∑</mo>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mn>∞</mn>
</munderover>
<mfrac>
<mn>1</mn>
<msup>
<mi>n</mi>
<mn>2</mn>
</msup>
</mfrac>
</mrow>
<mo>∊</mo>
<mrow>
<mo stretchy="false">(</mo>
<mfrac>
<mn>3</mn>
<mn>2</mn>
</mfrac>
<mo>,</mo>
<mfrac>
<mn>7</mn>
<mn>4</mn>
</mfrac>
<mo stretchy="false">]</mo>
</mrow>
</math>
Attached file rtl-math.html uses largeop="true" and stretchy="true" instead: the summation symbol is drawn bigger, the fences are stretched vertically but mirroring no longer happens (see attached screenshot rtl-math-chrome-canary-experimental-web-platform-features-disabled.png). This intent is trying to fix the latter while still preserving the largeop/stretchy feature (see rtl-math-chrome-canary-experimental-web-platform-features-enabled.png for how it should look like). I believe that gives you an example of failure, success and fix-dependent success renderings.
As I said, right-to-left layout of formulas is described in the
MathML Core spec, covered by tests and already implemented in
Chromium. Regarding mirroring technique of text (character-level
and glyph-level mirroring) they are described outside MathML Core,
and that spec was amended to use these techniques for
largeop/stretchy operators. You can find demos and more details on
the explainer:
https://people.igalia.com/fwang/mathml-operator-mirroring-explainer.html
Does the dir="rtl" attribute have to be specified specifically on <math>, or will it inherit the directionality of the ancestor?Hebrew, as far as I am aware, uses left-to-right for written math, so inheriting regardless of the language would not be correct for Hebrew, I think?
You are right regarding Hebrew. Actually even in some Arabic countries text is written from right-to-left but mathematical formulas remain in left-to-right direction. That's why the default UA sheet for MathML sets "direction: ltr" on the <math> element: https://w3c.github.io/mathml-core/#user-agent-stylesheet ; so indeed it's necessary to use an explicit dir="rtl" (which is mapped to direction: rtl).
Hope that answers your questions,
Frédéric
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/fe9dd258-93dc-4104-baca-5cee655f393e%40igalia.com.