Skip to content

Commit

Permalink
Bug 1844311 [wpt PR 41103] - [mathml] Draw a radical symbol for empty…
Browse files Browse the repository at this point in the history
… <mqsrt> elements., a=testonly

Automatic update from web-platform-tests
[mathml] Draw a radical symbol for empty <mqsrt> elements.

MathML Core says that the <msqrt> element generates an anonymous mrow
called the msqrt base, which is then used for layout [1]. In Blink's
implementation, LayoutNGMathMLBlockWithAnonymousMrow only creates such
an anonymous mrow when a first child is inserted. This CL ensures that
the algo and paint classes handle the case of an empty <msqrt> the same
as if there was an empty <mrow>.

[1] https://w3c.github.io/mathml-core/#radicals-msqrt-mroot

Bug: 1420632
Change-Id: I5db2577dc285bf2822586dee3eecbfb0d13dfb25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4698254
Commit-Queue: Frédéric Wang <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1172421}

--

wpt-commits: 88dd1bff7f5370b0e330b06dff18756eab447714
wpt-pr: 41103
  • Loading branch information
fred-wang authored and moz-wptsync-bot committed Jul 22, 2023
1 parent 34c39ba commit 5a25a25
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Empty &lt;msqrt&gt; element (reference)</title>
</head>
<body>
<math><msqrt><mrow></mrow></msqrt></math>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Empty &lt;msqrt&gt; element</title>
<link rel="help" href="https://w3c.github.io/mathml-core/#radicals-msqrt-mroot">
<meta name="assert" content="Empty msqrt should render as if it had a single empty mrow child.">
<link rel="match" href="empty-msqrt-ref.html">
</head>
<body>
<math><msqrt></msqrt></math>
<script src="/mathml/support/feature-detection.js"></script>
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_msqrt");</script>
</body>
</html>

0 comments on commit 5a25a25

Please sign in to comment.