[webkit-dev] Implementing MathML stylistic attributes in WebKit

Ryosuke Niwa rniwa at webkit.org
Mon Sep 28 16:45:52 PDT 2020


On Fri, Sep 25, 2020 at 12:47 AM Frédéric Wang <fwang at igalia.com> wrote:

> On 02/09/2019 16:11, Frédéric Wang wrote:
>
> Hello,
>
> Currently MathML attributes mathvariant, displaystyle and scriptlevel [1]
> [2] are implemented in WebKit using custom "style resolution" and
> "one-glyph rendering" inside the MathML layout code [3] [4] [5]. These
> features involve text rendering and interaction with CSS font-size, so it
> is difficult to implement them properly and completely that way. There are
> known bugs and missing features right now (e.g. mathvariant transform only
> applies to one-character strings, automatic displaystyle/scriptlevel does
> not work with fractions, etc)
>
> Hi,
>
> An update on this, we have been discussing these and new properties with
> the CSSWG:
>
> https://github.com/w3c/csswg-drafts/issues/5384
>
> The math-depth / math-style CSS properties are being implemented in
> Chromium and renamed/exposed/tweaked in Gecko:
>
> https://mathml-refresh.github.io/mathml-core/#the-math-style-property
>
>
> https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property
>
> So it makes sense to implement them in WebKit (it seems we still don't
> have a "intent to" mechanism, but people can follow
> https://bugs.webkit.org/show_bug.cgi?id=195797).
>
> The CSSWG is fine with a new text-transform value for automatic italic but
> using it for other values is controversial (see
> https://github.com/w3c/csswg-drafts/issues/3775). So if we want to
> preserve backward compatibility and fix existing bugs with mathvariant, we
> should probably re-implement it using an internal math-transform property
> (like what Gecko does) which according to our previous discussion is
> nowadays possible in WebKit.
>
Adding the support for new properties sounds good! My concern here is
really only about backwards compatibility.

- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20200928/bf2cdc02/attachment.htm>


More information about the webkit-dev mailing list