Skip to content

Commit

Permalink
part 3 - Implement special handling for operators using U+0338 and U+…
Browse files Browse the repository at this point in the history
…20D2.

MathML Core specifies that operators containing a UTF-16 strings of
length 2 ending with U+0338 COMBINING LONG SOLIDUS OVERLAY or U+20D2
COMBINING LONG VERTICAL LINE OVERLAY should just use the properties of
the first character. This commit implements that behavior. It removes
obsolete entries that are superseded by this rule and modifies
updateOperatorDictionary.pl to ensure that no such entries are present.

Existing WPT test operator-dictionary-combining.html is already passing
after bug 1789583 because the operators tested use the default spacing.
So extend it to try operators with different spacing.

[1] https://w3c.github.io/mathml-core/#dfn-algorithm-to-determine-the-category-of-an-operator

Differential Revision: https://phabricator.services.mozilla.com/D157707

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1790009
gecko-commit: 35725e846f2e211e3c4b691fd6d33f5d5a1aa715
gecko-reviewers: emilio
  • Loading branch information
fred-wang authored and pull[bot] committed Jan 12, 2024
1 parent 0e34414 commit 1267553
Showing 1 changed file with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
var epsilon = 1;
var emToPx = 25;

["equal", "vertical_bar"].forEach(id => {
[
"equal",
"vertical_bar",
"left_normal_factor_semidirect_product",
"there_exists",
].forEach(id => {
var div = document.getElementById(id);
var ref = div.getElementsByClassName("reference")[0];
var totalSpaceRef = spaceBetween(ref, 0, 2);
Expand Down Expand Up @@ -104,5 +109,51 @@
</math>
</p>
</div>
<div id="left_normal_factor_semidirect_product">
<p>
<math class="reference">
<mn>&nbsp;</mn>
<mo stretchy="false"></mo>
<mn>&nbsp;</mn>
</math>
</p>
<p>
<math class="combining">
<mn>&nbsp;</mn>
<mo stretchy="false">⋉&#x338;</mo>
<mn>&nbsp;</mn>
</math>
</p>
<p>
<math class="combining">
<mn>&nbsp;</mn>
<mo stretchy="false">⋉&#x20D2;</mo>
<mn>&nbsp;</mn>
</math>
</p>
</div>
<div id="there_exists">
<p>
<math class="reference">
<mn>&nbsp;</mn>
<mo stretchy="false"></mo>
<mn>&nbsp;</mn>
</math>
</p>
<p>
<math class="combining">
<mn>&nbsp;</mn>
<mo stretchy="false">∃&#x338;</mo>
<mn>&nbsp;</mn>
</math>
</p>
<p>
<math class="combining">
<mn>&nbsp;</mn>
<mo stretchy="false">∃&#x20D2;</mo>
<mn>&nbsp;</mn>
</math>
</p>
</div>
</body>
</html>

0 comments on commit 1267553

Please sign in to comment.