Skip to content

Commit

Permalink
Bug 1666407 [wpt PR 25666] - [mathml] Update CSS math-superscript-shi…
Browse files Browse the repository at this point in the history
…ft to match the specification, a=testonly

Automatic update from web-platform-tests
[mathml] Update CSS math-superscript-shift to match the specification

This feature was initially implemented in [1] [2]. After discussion with
the CSSWG, the property and values have been renamed [3]. This CL performs
the following changes:
- Rename math-superscript-shift to math-shift
- Rename value "display" and "inline" to "normal" and "compact"
- Add a MathML test to verify the effect of CSS math-shift
  (rather than just testing indirectly via UA style sheet rules).
- Sort math-style / math-shift alphabetically

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2144185
[2] https://chromium-review.googlesource.com/c/chromium/src/+/2277814
[3] w3c/csswg-drafts#5388

Bug: 6606
Change-Id: I1c7c7c12954261217cafffabffbe044c6659db9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421662
Reviewed-by: Rob Buis <[email protected]>
Reviewed-by: Rune Lillesveen <[email protected]>
Commit-Queue: Frédéric Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#809259}

--

wpt-commits: 96be9a34e38bf8d33636516aa7a81f414458589e
wpt-pr: 25666
  • Loading branch information
fred-wang authored and moz-wptsync-bot committed Sep 25, 2020
1 parent 3c5043c commit 4008bc9
Showing 1 changed file with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#radicals-msqrt-mroot">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#displaystyle-and-scriptlevel-in-scripts">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#user-agent-stylesheet">
<meta name="assert" content="Verify default calculation of math-superscript-shift-style on MathML elements">
<meta name="assert" content="Verify default calculation of math-shift on MathML elements">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
Expand Down Expand Up @@ -138,6 +138,14 @@
assert_cramped("mmultiscripts-005", false, "post-superscript");
}, "mmultiscripts");

test(function() {
assert_true(MathMLFeatureDetection.has_mspace());
assert_cramped("css-001", false);
assert_cramped("css-002", true);
assert_cramped("css-003", true);
assert_cramped("css-004", false);
}, "element with specified CSS math-style");

done();
}
</script>
Expand Down Expand Up @@ -588,5 +596,31 @@
</mmultiscripts>
</math>
</p>
<p>
<math id="css-001" style="math-shift: normal">
<msup class="testedElement">
<mspace height="2em" width="2em"/>
<mspace height="1em" width="1em"/>
</msup>
</math>
<math id="css-002" style="math-shift: compact">
<msup class="testedElement">
<mspace height="2em" width="2em"/>
<mspace height="1em" width="1em"/>
</msup>
</math>
<math id="css-003" style="math-shift: normal">
<msup class="testedElement" style="math-shift: compact">
<mspace height="2em" width="2em"/>
<mspace height="1em" width="1em"/>
</msup>
</math>
<math id="css-004" style="math-shift: compact">
<msup class="testedElement" style="math-shift: normal">
<mspace height="2em" width="2em"/>
<mspace height="1em" width="1em"/>
</msup>
</math>
</p>
</body>
</html>

0 comments on commit 4008bc9

Please sign in to comment.