Files
firefox/testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent.html
Frédéric Wang c68a474344 Bug 1882817 - Convert scriptlevel-movablelimits-1.html reftest to internal WPT test. r=emilio
This test verifies the MathML3 rule that the `accentunder`/`accent`
attributes are ignored when an `munderover` element (and similar
scripted elements) is laid out as an `msubsup` element (i.e. when the
base is a `movablelimits` operator in `displaystyle="false"`).

More specifically, setting `accentunder`/`accent` to `true` normally
prevents the `scriptlevel` to be incremented in an `munderover` element
(and similar scripted elements) but this test verifies that this rule
does not hold when such an element is laid out as an `msubsup` element.

In MathML Core, the CSS-based mechanism is slightly different: the
scripts of `munderover` (and similar scripted elements) always have
`math-depth: add(1)` in the UA sheet but `font-size: inherit` if the
corresponding `accentunder`/`accent` attribute is set to true. This
means that by default, the `accentunder`/`accent` scripts are not drawn
smaller even when laid out as an `msubsup`, contrary to MathML3.

Consequently, we keep this test as internal for now.

Differential Revision: https://phabricator.services.mozilla.com/D203577
2024-03-05 19:20:17 +00:00

39 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test accent/accentunder</title>
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=669713">
<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.munder">
<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.mover">
<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.munderover">
<link rel="match" href="scriptlevel-movablelimits-accent-ref.html">
<meta name="assert" content="Verify accentunder='true' or accent='true' is ignored when an underover element is laid out as a subsup element.">
</head>
<body>
<!-- Per MathML3, setting accentunder/accent to true prevents scriptlevel
from being incremented, however such attributes should be ignored when
scripts are drawn as subcript/superscript, which is the case here
because U+2211 N-ARY SUMMATION defaults to movablelimits="true". -->
<math displaystyle="false">
<munderover accentunder="true" accent="true">
<mo>∑</mo>
<mi>a</mi>
<mi>b</mi>
</munderover>
</math>
<math displaystyle="false">
<munder accentunder="true">
<mo>∑</mo>
<mi>a</mi>
</munder>
</math>
<math displaystyle="false">
<mover accent="true">
<mo>∑</mo>
<mi>a</mi>
</mover>
</math>
</body>
</html>