NEW314081
text/non-MathML children of annotation/annotation-xml are not rendered
https://bugs.webkit.org/show_bug.cgi?id=314081
Summary text/non-MathML children of annotation/annotation-xml are not rendered
Frédéric Wang Nélar
Reported 2026-05-05 06:23:32 PDT
Created attachment 479475 [details] testcase Consider the following test case: <!DOCTYPE html> <meta charset="utf-8"/> <style> annotation-xml, annotation { display: initial; } </style> <math> <semantics> <mtext></mtext> <annotation>annotation</annotation> </semantics> </math> <math> <semantics> <!-- encoding attribute guarantees the HTML parser keeps the span as a child of annotation-xml --> <mtext></mtext><annotation-xml encoding="text/html"><span>annotation-xml</span></annotation-xml> </semantics> </math> Firefox and Chromium will render the text "annotation" and "annotation-xml". WebKit will only render annotation-xml This seems to be a regression from https://github.com/WebKit/WebKit/pull/51387/changes#diff-a9625de9071fd6b99215283bb592203a7ee03edf7e696a4261babbc7a409b660 because now annotation only accepts MathML children, not text node. The spec is not really clear about what to do with "invalid" children: https://github.com/w3c/mathml-core/issues/57 However, typical use case from MathML3 is to have text children for annotation and non-MathML markup for annotation-xml, so probably previous code was correct.
Attachments
testcase (460 bytes, text/html)
2026-05-05 06:23 PDT, Frédéric Wang Nélar
no flags
Eri
Comment 1 2026-05-07 01:00:36 PDT
Note You need to log in before you can comment on or make changes to this bug.