-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MathML: Add tests for children not participating to their parent layout #18293
Conversation
This commit adds new tests to verify that children with "display: none", "position: absolute" or "position: fixed" don't affect preferred width calculation or layout of their parents. - mathml/support/mathml-fragments.js: Add function to append a non empty child (optionally making the element invalid) and use that function for forceNonEmptyElement. - mathml/support/layout-comparison.js: Introduce new helpers function to extract the children participating to their parent layout. Modify compareLayout so that it browser that list of children instead and allow comparison in horizontal+LTR mode.
There are no reviewers for this pull request besides its author. Please reach out on W3C's irc server (irc.w3.org, port 6665) on channel #testing (web client) to get help with this. Thank you! |
Note: This (unsurprisingly) causes assertion failure in Igalia's Chromium build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think floats are the same category and should be tested as well.
Right, I had checked and Chromium has two different functions for out-of-flow and float: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/layout/api/line_layout_item.h?q=OutOfFlowPositioned&dr=CSs&l=140 I'm not sure yet what mathml core should say for floats but will add a TODO |
I forgot to say in the commit, but this is related to https://github.com/mathml-refresh/mathml/issues/16 |
…ut (web-platform-tests#18293) * MathML: Add tests for children not participating to their parent layout This commit adds new tests to verify that children with "display: none", "position: absolute" or "position: fixed" don't affect preferred width calculation or layout of their parents. - mathml/support/mathml-fragments.js: Add function to append a non empty child (optionally making the element invalid) and use that function for forceNonEmptyElement. - mathml/support/layout-comparison.js: Introduce new helpers function to extract the children participating to their parent layout. Modify compareLayout so that it browser that list of children instead and allow comparison in horizontal+LTR mode. * Add feature detection otherwise these tests pass when MathML is disabled. * Add TODO for floats.
This commit adds new tests to verify that children with "display: none",
"position: absolute" or "position: fixed" don't affect preferred width
calculation or layout of their parents.
mathml/support/mathml-fragments.js: Add function to append a non empty
child (optionally making the element invalid) and use that function for
forceNonEmptyElement.
mathml/support/layout-comparison.js: Introduce new helpers function to
extract the children participating to their parent layout. Modify
compareLayout so that it browser that list of children instead and allow
comparison in horizontal+LTR mode.