[Gecko Bug 2018114] Part 3: Add more tests for lspace/rspace and update expectations.#58037
Open
moz-wptsync-bot wants to merge 3 commits intomasterfrom
Open
[Gecko Bug 2018114] Part 3: Add more tests for lspace/rspace and update expectations.#58037moz-wptsync-bot wants to merge 3 commits intomasterfrom
moz-wptsync-bot wants to merge 3 commits intomasterfrom
Conversation
* mo-lspace-rspace-5.html: This is a new test to actually verify the spacing around (embellished) operators that have lspace/rspace, using the distance to the previous/next sibling box for 8 cases (all combinations of math/mrow container, RTL/LTR directions and embellished/non-embellished operators). For each of them, we try various kinds of operarors (normal text, largeop, stretchy variant and stretchy glyph assembly). In the past we were always including the lspace/rspace in the width of the (embellished) operators, so the actual distance was zero and all the tests were failing. Now, we only do that for children of math/mtd. * painting-stretchy-operator-002.html: This is a new test to verify that an operator with lspace/rspace is painted at the proper horizontal offset, for 8 cases (all combinations of math/mrow container, RTL/LTR directions and embellished/non-embellished operators). This is already passing in all browsers even when they wrongly include lspace/rspace in the operator's width, but it allows to catch potential painting regressions (especially the need for the new nsMathMLmoFrame::FixInterFrameSpacing). * no-spacing.html: This test verifies that spacing is not added around `<mo>` elements with lspace/rspace, when the parent does not perform mrow layout ; and that spacing is added around the parent if and only if that parent is an embellished operator. In the past we were always modifying the width of (embellished) operators so the width-based checks of the test were failing. Now, we only do that for direct children of math/mtd, not for (non-embellished) mrow elements. We extend these tests to cover these three kinds of parents. Additionally, we were also always adding spacing around mroot (which is never an embellished operator), but this is fixed now. * mrow-preferred-width.html: This test verifies preferred width of mrow, including the cases when it contains a stretchy operator with lspace/rspace. Although we currently pass it, the preferred width is currently wrong when the operator is actually embellished, so we extend the test to cover that case. Additionally, we add cases when the mrow-like container is actually the <math> tag. Differential Revision: https://phabricator.services.mozilla.com/D284372 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2018114 gecko-commit: 043279b5701d8d3dc67c994e0d4ebbb334905206 gecko-reviewers: emilio
wpt-pr-bot
approved these changes
Feb 25, 2026
Collaborator
wpt-pr-bot
left a comment
There was a problem hiding this comment.
The review process for this patch is being conducted in the Firefox project.
…date expectations. " for causing bp-nu bustages in nsMathMLContainerFrame.cpp. This reverts commit b8a5fb1b58e7ca9151ec4644474e29825353a28c. This reverts commit def02242e1190a3ab0d2170e38d6f937b94b95f0. This reverts commit d87631000ae88bddfe18ae4dab3ce9af4d3c80bb. gecko-commit: ee090fb48a6b3ee8f9545b20f58e6415a6863d45 gecko-reviewers: emilio
* mo-lspace-rspace-5.html: This is a new test to actually verify the spacing around (embellished) operators that have lspace/rspace, using the distance to the previous/next sibling box for 8 cases (all combinations of math/mrow container, RTL/LTR directions and embellished/non-embellished operators). For each of them, we try various kinds of operarors (normal text, largeop, stretchy variant and stretchy glyph assembly). In the past we were always including the lspace/rspace in the width of the (embellished) operators, so the actual distance was zero and all the tests were failing. Now, we only do that for children of math/mtd. * painting-stretchy-operator-002.html: This is a new test to verify that an operator with lspace/rspace is painted at the proper horizontal offset, for 8 cases (all combinations of math/mrow container, RTL/LTR directions and embellished/non-embellished operators). This is already passing in all browsers even when they wrongly include lspace/rspace in the operator's width, but it allows to catch potential painting regressions (especially the need for the new nsMathMLmoFrame::FixInterFrameSpacing). * no-spacing.html: This test verifies that spacing is not added around `<mo>` elements with lspace/rspace, when the parent does not perform mrow layout ; and that spacing is added around the parent if and only if that parent is an embellished operator. In the past we were always modifying the width of (embellished) operators so the width-based checks of the test were failing. Now, we only do that for direct children of math/mtd, not for (non-embellished) mrow elements. We extend these tests to cover these three kinds of parents. Additionally, we were also always adding spacing around mroot (which is never an embellished operator), but this is fixed now. * mrow-preferred-width.html: This test verifies preferred width of mrow, including the cases when it contains a stretchy operator with lspace/rspace. Although we currently pass it, the preferred width is currently wrong when the operator is actually embellished, so we extend the test to cover that case. Additionally, we add cases when the mrow-like container is actually the <math> tag. Differential Revision: https://phabricator.services.mozilla.com/D284372 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2018114 gecko-commit: 12317b45eb068f8f2b8a246856a8ced374a22402 gecko-reviewers: emilio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mo-lspace-rspace-5.html: This is a new test to actually verify the
spacing around (embellished) operators that have lspace/rspace,
using the distance to the previous/next sibling box for 8 cases
(all combinations of math/mrow container, RTL/LTR directions and
embellished/non-embellished operators). For each of them, we
try various kinds of operarors (normal text, largeop, stretchy
variant and stretchy glyph assembly). In the past we were always
including the lspace/rspace in the width of the (embellished)
operators, so the actual distance was zero and all the tests were
failing. Now, we only do that for children of math/mtd.
painting-stretchy-operator-002.html: This is a new test to verify
that an operator with lspace/rspace is painted at the proper
horizontal offset, for 8 cases (all combinations of math/mrow
container, RTL/LTR directions and embellished/non-embellished
operators). This is already passing in all browsers even when they
wrongly include lspace/rspace in the operator's width, but it allows
to catch potential painting regressions (especially the need for the
new nsMathMLmoFrame::FixInterFrameSpacing).
no-spacing.html: This test verifies that spacing is not added around
<mo>elements with lspace/rspace, when the parent does not performmrow layout ; and that spacing is added around the parent if and only
if that parent is an embellished operator. In the past we were always
modifying the width of (embellished) operators so the width-based
checks of the test were failing. Now, we only do that for direct children
of math/mtd, not for (non-embellished) mrow elements. We extend these
tests to cover these three kinds of parents. Additionally, we were
also always adding spacing around mroot (which is never an
embellished operator), but this is fixed now.
mrow-preferred-width.html: This test verifies preferred width of
mrow, including the cases when it contains a stretchy operator with
lspace/rspace. Although we currently pass it, the preferred width is
currently wrong when the operator is actually embellished, so we
extend the test to cover that case. Additionally, we add cases
when the mrow-like container is actually the tag.
Differential Revision: https://phabricator.services.mozilla.com/D284372
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2018114
gecko-commit: 043279b5701d8d3dc67c994e0d4ebbb334905206
gecko-reviewers: emilio