[webkit-dev] MathML refactoring: Project Complete!

Frédéric WANG fred.wang at free.fr
Wed Jul 13 10:22:03 PDT 2016


Hi WebKit developers,

We are happy to announce that we are done with the MathML refactoring
proposed last December [1]. The first phase was a big clean up of the
MathML implementation and you can find details in a first blog post [2]
but essentially:

* MathML renderer classes now derive from RenderBlock instead of
RenderFlexible (except RenderMathMLTable which still derives from
RenderTable) so we no longer interfere with the flexbox code.
* MathML renderer classes do not create anonymous renderers any more
(except RenderMathMLFenced which creates anonymous
RenderMathMLOperators) so the render tree essentially matches the DOM tree.
* MathML renderer classes now perform simple box layout (again except
for RenderMathMLTable and RenderMathMLFenced) and should be much more
consistent with the rest of the WebKit code.

Many MathML rendering bugs have been fixed as an immediate consequence
of this clean up. But it also became much easier to follow OpenType MATH
& TeX rules for layout [3] and to implement important MathML features.
This has been done in a second phase and you can find details on the
MathML improvements in a second blog post [4].

During the development, we also decided to include a third phase: Moving
the parsing of MathML attributes into the DOM classes instead of doing
it in the renderer classes. This has only been partially achieved but
could be addressed in future developments. For those who are interested,
it is tracked in [5].

Finally, we tested the rendering on GTK, EFL, OS X and iOS ports and it
seems good. The status of the Windows port is unknown. We expanded the
test suite with more MathML tests and performed some gardening:
* All the tests pass on the GTK bots.
* All but the mismatch tests pass on EFL bots (it's not clear whether
screenshots are correctly taken).
* As discussed in a previous thread, OS X and iOS bots lack
pre-installed math fonts [6] and these fonts are not whitelisted by the
test runner. Most of the failures were due to tests requiring such math
fonts and so these tests are now skipped.
* The Windows port also has several unexplained failures but someone
should analyze that more carefully.

We plan to continue MathML developments in the future including
finishing some refactoring (RenderMathMLTable, attribute parsing...) and
improving MathML support and rendering quality.

Thank you again to all the people who made this contribution possible!

Frédéric, for the Igalia's Web Platform Team

[1] https://trac.webkit.org/wiki/MathML/Early_2016_Refactoring
[2] http://frederic-wang.fr/mathml-refactoring-in-webkit.html
[3] http://www.mathml-association.org/MathMLinHTML5/
[4] http://frederic-wang.fr/mathml-improvements-in-webkit.html
[5] https://webkit.org/b/156536
[6] https://trac.webkit.org/wiki/MathML/Fonts


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20160713/dd7eb427/attachment.sig>


More information about the webkit-dev mailing list