From 46b884903ba0153b2cd9d932504f6b88f57614cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= <fwang@igalia.com>
Date: Sat, 9 May 2020 18:24:44 +0200
Subject: [PATCH] Update menclose help and explain better how tests work in
 MathML core (#23495)

No consensus have been reached on the future on menclose so far but this
element has been the source of confusion so the current draft text has
been removed from MathML Core and put in a separate pull request:

https://github.com/mathml-refresh/mathml-core/pull/24

This PR updates the WPT tests accordingly:

* Actual tests for menclose are renamed "tentative" and refer to the
  pull request above, so that it becomes clear they are not definitive yet
  and browsers are free to ignore them.

* Tests for mrow-like are now referring to MathML3
  https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose
  They are still valid because unknown elements are treated as mrow-like
  in MathML Core.

* Tests for removed legacy features are obviously still valid too.
  Again, the documentation is updated to refer to MathML3
  https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose
---
 .../menclose/legacy-menclose-radical-notation.html            | 2 +-
 mathml/presentation-markup/mrow/inferred-mrow-baseline.html   | 3 ++-
 mathml/presentation-markup/mrow/inferred-mrow-stretchy.html   | 3 ++-
 mathml/presentation-markup/mrow/legacy-mstyle-attributes.html | 3 ++-
 mathml/presentation-markup/mrow/spacing.html                  | 3 ++-
 .../{color-004-ref.html => color-004.tentative-ref.html}      | 0
 .../css-styling/{color-004.html => color-004.tentative.html}  | 4 ++--
 ...ibility-004-ref.html => visibility-004.tentative-ref.html} | 0
 .../{visibility-004.html => visibility-004.tentative.html}    | 4 ++--
 9 files changed, 13 insertions(+), 9 deletions(-)
 rename mathml/relations/css-styling/{color-004-ref.html => color-004.tentative-ref.html} (100%)
 rename mathml/relations/css-styling/{color-004.html => color-004.tentative.html} (95%)
 rename mathml/relations/css-styling/{visibility-004-ref.html => visibility-004.tentative-ref.html} (100%)
 rename mathml/relations/css-styling/{visibility-004.html => visibility-004.tentative.html} (95%)

diff --git a/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html b/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html
index 9b71389e74dd11..353202fd7b824d 100644
--- a/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html
+++ b/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html
@@ -4,7 +4,7 @@
     <meta charset="utf-8"/>
     <title>Legacy menclose radical notation</title>
     <link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose">
-    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
+    <link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose">
     <meta name="assert" content="Verify that the legacy menclose radical notation is ignored.">
     <link rel="match" href="legacy-menclose-radical-notation-ref.html">
     <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
diff --git a/mathml/presentation-markup/mrow/inferred-mrow-baseline.html b/mathml/presentation-markup/mrow/inferred-mrow-baseline.html
index c92cbba922f0c1..76d35d125ec260 100644
--- a/mathml/presentation-markup/mrow/inferred-mrow-baseline.html
+++ b/mathml/presentation-markup/mrow/inferred-mrow-baseline.html
@@ -9,7 +9,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#error-message-merror">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#making-sub-expressions-invisible-mphantom">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-top-level-math-element">
-<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#adjust-space-around-content-mpadded">
 <meta name="assert" content="Baseline for mrow-like elements is correct.">
 <script src="/mathml/support/feature-detection.js"></script>
@@ -41,6 +41,7 @@
     <math><merror><mspace id="aboveError" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowError" width="10px" depth="30px" style="background: blue"></mspace></merror></math>
     <math><mphantom><mspace style="visibility: visible;" id="abovePhantom" width="10px" height="30px" style="background: purple"></mspace><mspace style="visibility: visible;" id="belowPhantom" width="10px" depth="30px" style="background: blue"></mspace></mphantom></math>
     <math><mspace id="aboveMath" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowMath" width="10px" depth="30px" style="background: blue"></mspace></math>
+    <!-- menclose is treated as <unknown> in MathML Core -->
     <math><menclose notation="box"><mspace id="aboveMenclose" width="10px" height="30px" style="background: purple"
 ></mspace><mspace id="belowMenclose" width="10px" depth="30px" style="background: blue"></mspace></menclose></math>
     <math><mpadded lspace="10px"><mspace id="aboveMpadded" width="10px" height="30px" style="background: purple"
diff --git a/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html b/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html
index 4b89dd6fa5f0da..3182fba0eaf48d 100644
--- a/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html
+++ b/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html
@@ -9,7 +9,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#error-message-merror">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#making-sub-expressions-invisible-mphantom">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-top-level-math-element">
-<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#adjust-space-around-content-mpadded">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
 <meta name="assert" content="Operators can stretch inside mrow-like elements.">
@@ -51,6 +51,7 @@
     <math><merror><mo id="moError">&#x21A8;</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></merror></math>
     <math><mphantom><mo style="visibilty: visible;" id="moPhantom">&#x21A8;</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mphantom></math>
     <math><mo id="moMath">&#x21A8;</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></math>
+    <!-- menclose is treated as <unknown> in MathML Core -->
     <math><menclose notation="box"><mo id="moMenclose">&#x21A8;</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></menclose></math>
     <math><mpadded lspace="10px"><mo id="moMpadded">&#x21A8;</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mpadded></math>
     <math><unknown><mo id="moUnknown">&#x21A8;</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></unknown></math>
diff --git a/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html b/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html
index 0de9a90eed9de0..bfc04adb9055e7 100644
--- a/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html
+++ b/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html
@@ -9,7 +9,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fractions-mfrac">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#string-literal-ms">
-<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose">
 <meta name="assert" content="Legacy mstyle attributes are ignored">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
@@ -135,6 +135,7 @@
       </mstyle>
     </math>
   </p>
+  <!-- notation attribute is from MathML3's menclose element -->
   <p class="TestContainer" id="menclose">
     <math>
       <mstyle notation="box">
diff --git a/mathml/presentation-markup/mrow/spacing.html b/mathml/presentation-markup/mrow/spacing.html
index 4bdfc9a001a3fa..0ff7bae5b00fd7 100644
--- a/mathml/presentation-markup/mrow/spacing.html
+++ b/mathml/presentation-markup/mrow/spacing.html
@@ -9,7 +9,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#error-message-merror">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#making-sub-expressions-invisible-mphantom">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-top-level-math-element">
-<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.menclose">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#adjust-space-around-content-mpadded">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
 <meta name="assert" content="Spacing is added around operators inside mrow-like elements.">
@@ -43,6 +43,7 @@
     <math><merror id="Error"><mn>1</mn><mo lspace="50px"></mo><mn>2</mn></merror></math>
     <math><mphantom id="Phantom"><mn>1</mn><mo lspace="50px">|</mo><mn>2</mn></mphantom></math>
     <math id="Math"><mn>1</mn><mo lspace="50px">|</mo><mn>2</mn></math>
+    <!-- menclose is treated as <unknown> in MathML Core -->
     <math><menclose id="Menclose" notation="box"><mn>1</mn><mo lspace="50px">|</mo><mn>2</mn></menclose></math>
     <math><mpadded id="Mpadded" lspace="10px"><mn>1</mn><mo lspace="50px">|</mo><mn>2</mn></mpadded></math>
     <math><unknown id="Unknown"><mn>1</mn><mo lspace="50px">|</mo><mn>2</mn></unknown></math>
diff --git a/mathml/relations/css-styling/color-004-ref.html b/mathml/relations/css-styling/color-004.tentative-ref.html
similarity index 100%
rename from mathml/relations/css-styling/color-004-ref.html
rename to mathml/relations/css-styling/color-004.tentative-ref.html
diff --git a/mathml/relations/css-styling/color-004.html b/mathml/relations/css-styling/color-004.tentative.html
similarity index 95%
rename from mathml/relations/css-styling/color-004.html
rename to mathml/relations/css-styling/color-004.tentative.html
index 251cd0530fbe78..d5a984f6e7e9c6 100644
--- a/mathml/relations/css-styling/color-004.html
+++ b/mathml/relations/css-styling/color-004.tentative.html
@@ -5,8 +5,8 @@
 <title>color</title>
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
-<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
-<link rel="match" href="color-004-ref.html"/>
+<link rel="help" href="https://github.com/mathml-refresh/mathml-core/pull/24">
+<link rel="match" href="color-004.tentative-ref.html"/>
 <meta name="assert" content="Verify that the color is used for text and graphical elements of the menclose element.">
 </head>
 <body>
diff --git a/mathml/relations/css-styling/visibility-004-ref.html b/mathml/relations/css-styling/visibility-004.tentative-ref.html
similarity index 100%
rename from mathml/relations/css-styling/visibility-004-ref.html
rename to mathml/relations/css-styling/visibility-004.tentative-ref.html
diff --git a/mathml/relations/css-styling/visibility-004.html b/mathml/relations/css-styling/visibility-004.tentative.html
similarity index 95%
rename from mathml/relations/css-styling/visibility-004.html
rename to mathml/relations/css-styling/visibility-004.tentative.html
index ed4a4aeb09d53c..41d8da63312408 100644
--- a/mathml/relations/css-styling/visibility-004.html
+++ b/mathml/relations/css-styling/visibility-004.tentative.html
@@ -5,8 +5,8 @@
 <title>visibility</title>
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
-<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
-<link rel="match" href="visibility-004-ref.html"/>
+<link rel="help" href="https://github.com/mathml-refresh/mathml-core/pull/24">
+<link rel="match" href="visibility-004.tentative-ref.html"/>
 <meta name="assert" content="Verify that visibility=hidden is used for the text and graphical elements of the menclose element.">
 </head>
 <body>