Closed Bug 1882817 Opened 4 months ago Closed 4 months ago

Export more MathML reftests to WPT

Categories

(Core :: MathML, task)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

(Blocks 1 open bug)

Details

Attachments

(15 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.

These tests use pseudo-units, which are not part of MathML Core.

Attachment #9388442 - Attachment description: WIP: Bug 1882817 - Move remaining mpadded reftests to internal WPT tests. r=emilio → Bug 1882817 - Move remaining mpadded reftests to internal WPT tests. r=emilio

These mstyle reftests verify that attributes on the mstyle element
have no effect and this is handled by existing WPT test
legacy-mstyle-attributes.html. So we just add the missing cases:

  • mstyle-2.xhtml: This was removed from reftest.list by mistake in
    D185270. mspace attributes are already covered, we add tests
    for the mpadded attributes.

  • mstyle-3.xhtml: most mo attributes are covered, we add the
    missing case of the form attribute. Also tweak the test for the
    accent attribute to avoid potential clash with mover@accent.

  • mstyle-4.xhtml: These are tests for accent/accentunder
    attributes on the mover/munder/munderover. Export them.

We also reword the note to stop saying we don't test mpadded or
accent/accentunder attributes on the munderover family of elements.

Attachment #9388596 - Attachment description: WIP: Bug 1882817 - Export remaining internal semantics reftests to WPT. r=emilio → Bug 1882817 - Export remaining internal semantics reftests to WPT. r=emilio
Attachment #9388722 - Attachment description: WIP: Bug 1882817 - Export some mmultiscripts reftests to WPT. r=emilio → Bug 1882817 - Export some mmultiscripts reftests to WPT. r=emilio
Pushed by fwang@igalia.com:
https://hg.mozilla.org/integration/autoland/rev/b6fa68bebca2
Move remaining mpadded reftests to internal WPT tests. r=emilio
https://hg.mozilla.org/integration/autoland/rev/093a8f03aa3e
Export remaining internal mstyle reftests to WPT. r=emilio
https://hg.mozilla.org/integration/autoland/rev/5cc2d18fe5c0
Export remaining internal semantics reftests to WPT. r=emilio
https://hg.mozilla.org/integration/autoland/rev/8a5c2b584dfb
Export some mmultiscripts reftests to WPT. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/44897 for changes under testing/web-platform/tests
Attachment #9388955 - Attachment description: WIP: Bug 1882817 - Export mo-glyph-size.html to WPT. r=emilio → Bug 1882817 - Export mo-glyph-size.html to WPT. r=emilio

This case was included in a reftest in order to exercise an assertion
related to the direction passed for operator stretching but no visual
are JS checks are actually performed on it. So export it in its own
separate crash test instead.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1092053#c9

These tests verify operator stretching for various stretchy or largeop
operators, by checking the BoundingClientRect of <mo> operators.
This is equivalent to existing more exhaustive checks that are done in
WPT, the difference is that here they are only relying on the fonts
pre-installed on the system. So export these tests assuming they are
checking some basic support with the default math font. Gecko is able
to use scale transforms to emulate operator stretching, so it always
pass the tests even when the system does not provide good math fonts.

Additionally, these tests are written as reftests, but are really only
doing some JavaScript checks, so rewrite them as testharness.js tests.

Attachment #9388966 - Attachment description: WIP: Bug 1882817 - Export stretchy-largeop-* reftests as WPT testharness.js tests. r=emilio → Bug 1882817 - Export stretchy-largeop-* reftests as WPT testharness.js tests. r=emilio
Upstream PR merged by moz-wptsync-bot

This test was introduced in bug 854339 to verify it is possible to
horizontally stretch the equal sign using unicode-based glyph
assembly such as the ones described in [1]. This is non-normative, so
keep it as an internal test for now.

[1] https://w3c.github.io/mathml-core/#unicode-based-glyph-assemblies

Attachment #9389027 - Attachment description: WIP: Bug 1882817 - Convert reftest for stretchy equal sign to an internal WPT. r=emilio → Bug 1882817 - Convert reftest for stretchy equal sign to an internal WPT. r=emilio

These tests were introduced in bug 414277 to verify stretching fallback
using a scale transform. The tests assume that the default fonts don't
provide a way to stretch the operators in the tests (e.g. triple arrows
and quadruple integrals) so that the scale stretching fallback. Moreover
it assumes that the operators stretch perfectly to match the target
size.

These assumptions may be incorrect and are difficult to ensure, which
is likely why one test fails on mac (which as STIX pre-installed). For
now, we keep the test as is but just make sure the preference
mathml.scale_stretchy_operators.enabled is enabled.

Attachment #9389047 - Attachment description: WIP: Bug 1882817 - Convert reftests for stretching by scaling to internal WPT tests. r=emilio → Bug 1882817 - Convert reftests for stretching by scaling to internal WPT tests. r=emilio

These are old reftests added for bug 427666 and bug 428863, at the time
when MathML rendering was severely broken. They set various CSS tweaks
and probably depend on the system's fonts used back at that time, which
make it difficult to properly export them to the upstream WPT repository
(a previous attempt failed in bug 1847280). Consequently, we just move
them to our internal WPT test with minimal changes.

Attachment #9389047 - Attachment description: Bug 1882817 - Convert reftests for stretching by scaling to internal WPT tests. r=emilio → WIP: Bug 1882817 - Convert reftests for stretching by scaling to internal WPT tests. r=emilio
Pushed by fwang@igalia.com:
https://hg.mozilla.org/integration/autoland/rev/ab7949b9c722
Export mo-glyph-size.html to WPT. r=emilio
https://hg.mozilla.org/integration/autoland/rev/6d81a91f4a64
Export a crashtest for bigotimes to WPT. r=emilio
https://hg.mozilla.org/integration/autoland/rev/5bb118aeb210
Export stretchy-largeop-* reftests as WPT testharness.js tests. r=emilio
https://hg.mozilla.org/integration/autoland/rev/6c8dfd2a5bca
Convert reftest for stretchy equal sign to an internal WPT. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/44907 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Attachment #9389047 - Attachment description: WIP: Bug 1882817 - Convert reftests for stretching by scaling to internal WPT tests. r=emilio → Bug 1882817 - Convert reftests for stretching by scaling to internal WPT tests. r=emilio

These empty files are unused and were landed by mistake in bug 1190646.

These tests were introduced in bug 557476 to test horizontal alignment
of under/over scripts for different values of the MathML3 align
attribute. In bug 1784003, we completely removed support for that
attribute and simplified the tests, so it now only verifies the default
centering. This is covered by other WPT testharness.js tests but let's
keep these reftests to check the visual rendering and that the value
of accent/accentunder attributes don't interfer with that centering.

Attachment #9389301 - Attachment description: WIP: Bug 1882817 - Export munderover-align-accent-* tests to WPT. r=emilio → Bug 1882817 - Export munderover-align-accent-* tests to WPT. r=emilio

These tests compare scripted elements (e.g. munderover or
mmultiscripts) with empty scripts (e.g. <mspace/> or <none/>)
against the equivalent constructs without the empty scripts
(e.g. mover, msup etc). Gecko has some specific adjustments to make
them render the same, taking into account "ink" and logical metrics.
It's not clear whether this is aligned with MathML Core and one of the
test is even failing on some platforms (likely due to different system
fonts) so for now we just keep them as internal WPT tests.

Attachment #9389310 - Attachment description: WIP: Bug 1882817 - Export reftests for empty scripts to internal WPT tests. r=emilio → Bug 1882817 - Export reftests for empty scripts to internal WPT tests. 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.

Attachment #9389320 - Attachment description: WIP: Bug 1882817 - Convert scriptlevel-movablelimits-1.html reftest to internal WPT test. r=emilio → Bug 1882817 - Convert scriptlevel-movablelimits-1.html reftest to internal WPT test. r=emilio

This test was added in bug 945254 to verify that the italic correction
of the base [1] is taken into account when attaching subscripts to it.
The test assumes no MathItalicsCorrectionInfo is provided from a
MATH table and that Gecko estimates such an italic correction from
ink metrics instead. This estimation is not defined in MathML Core, so
keep the test as internal for now.

This is a JS test written as a reftest (drawing a red background if the
an assertion fails) so rewrite it as a testharness.js test. The Linux
expectation is rewritten to make the test random as this was discussed
on bug 1599640. Ideally, this test should use a custom non-MATH font
with a slanted glyph in order to make it less dependent on which
system fonts are used.

[1] https://w3c.github.io/mathml-core/#dfn-italic-correction

Attachment #9389336 - Attachment description: WIP: Bug 1882817 - Convert subscript-italic-correction.html to internal testharness test. r=emilio → Bug 1882817 - Convert subscript-italic-correction.html to internal testharness test. r=emilio
Blocks: 1883603
Keywords: leave-open
Pushed by fwang@igalia.com:
https://hg.mozilla.org/integration/autoland/rev/a1e252ada9c2
Convert reftests for stretching by scaling to internal WPT tests. r=emilio
https://hg.mozilla.org/integration/autoland/rev/611ce80cbb49
Move reftests for underbar/overbar stretching to internal WPT. r=emilio
https://hg.mozilla.org/integration/autoland/rev/4184139c56b6
Remove unintentionally landed largeop-1 files. r=emilio
https://hg.mozilla.org/integration/autoland/rev/203b90fe4d60
Export munderover-align-accent-* tests to WPT. r=emilio
https://hg.mozilla.org/integration/autoland/rev/8e285f3326c0
Export reftests for empty scripts to internal WPT tests. r=emilio
https://hg.mozilla.org/integration/autoland/rev/7e3046661330
Convert scriptlevel-movablelimits-1.html reftest to internal WPT test. r=emilio
https://hg.mozilla.org/integration/autoland/rev/3796113f62f6
Convert subscript-italic-correction.html to internal testharness test. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/44948 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: