Synchronize MathML WPT tests against upstream
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2019 11:00:53 +0000 (11:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2019 11:00:53 +0000 (11:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201975

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-20
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Sync is based on a3a4442b04c37155f81c4ad4ae9c06339f76ce14.

* resources/import-expectations.json:
* web-platform-tests/mathml/presentation-markup/direction/direction-006.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-007.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-008.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-009.html:
* web-platform-tests/mathml/presentation-markup/direction/direction-010.html:
* web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html: Added.
* web-platform-tests/mathml/presentation-markup/fractions/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html: Added.
* web-platform-tests/mathml/presentation-markup/menclose/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/w3c-import.log.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html: Added.
* web-platform-tests/mathml/presentation-markup/mrow/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001-expected.txt:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001.html:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002-expected.txt:
* web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form-dynamic.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form-fallback.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-form.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html: Added.
* web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html:
* web-platform-tests/mathml/presentation-markup/operators/mo-paint-lspace-rspace.html:
* web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html: Added.
* web-platform-tests/mathml/presentation-markup/operators/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow-expected.html: Added.
* web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html: Added.
* web-platform-tests/mathml/presentation-markup/radicals/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html: Added.
* web-platform-tests/mathml/presentation-markup/scripts/w3c-import.log:
* web-platform-tests/mathml/presentation-markup/spaces/space-like-004-expected.txt:
* web-platform-tests/mathml/presentation-markup/spaces/space-like-004.html:
* web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/tables/table-001.html: Added.
* web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt: Added.
* web-platform-tests/mathml/presentation-markup/tables/table-002.html: Added.
* web-platform-tests/mathml/presentation-markup/tables/w3c-import.log:
* web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-011.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-012.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-013.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-014.html:
* web-platform-tests/mathml/relations/css-styling/displaystyle-015.html:
* web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Added.
* web-platform-tests/mathml/relations/css-styling/ignored-properties-001.html: Added.
* web-platform-tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html:
* web-platform-tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-auto.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold-script.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-bold.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-double-struck.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-fraktur.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-initial.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-looped.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-monospace.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-script.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-stretched.html:
* web-platform-tests/mathml/relations/css-styling/mathvariant-tailed.html:
* web-platform-tests/mathml/relations/css-styling/not-participating-to-parent-layout.html:
* web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html:
* web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-002.html:
* web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002.html:
* web-platform-tests/mathml/relations/css-styling/w3c-import.log:
* web-platform-tests/mathml/relations/css-styling/width-height-001.html:
* web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html:
* web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative-expected.html:
* web-platform-tests/mathml/relations/html5-tree/display-2-expected.html: Added.
* web-platform-tests/mathml/relations/html5-tree/display-2.html: Added.
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
* web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html:
* web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt: Added.
* web-platform-tests/mathml/relations/html5-tree/tabindex-001.html: Added.
* web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt: Added.
* web-platform-tests/mathml/relations/html5-tree/tabindex-002.html: Added.
* web-platform-tests/mathml/relations/html5-tree/w3c-import.log:
* web-platform-tests/mathml/support/box-navigation.js: Added.
(IsInFlow):
(firstInFlowChild):
(nextInFlowSibling):
(previousInFlowSibling):
* web-platform-tests/mathml/support/feature-detection.js:
(MathMLFeatureDetection.string_appeared_here):
(MathMLFeatureDetection.has_mspace): Deleted.
(MathMLFeatureDetection.has_operator_spacing): Deleted.
(MathMLFeatureDetection.has_mfrac): Deleted.
(MathMLFeatureDetection.has_msqrt): Deleted.
(MathMLFeatureDetection.has_menclose): Deleted.
(MathMLFeatureDetection.has_dir): Deleted.
* web-platform-tests/mathml/support/mathml-fragments.js:
(FragmentHelper.createElement):
(FragmentHelper.forceNonEmptyElement):
(FragmentHelper.forceNonEmptyDescendants):
* web-platform-tests/mathml/support/operator-dictionary.js: Added.
(async.fetchOperatorDictionary):
(splitKey):
(spaceIndexToLength):
(defaultPropertyValue):
* web-platform-tests/mathml/support/operator-dictionary.json: Added.
* web-platform-tests/mathml/support/w3c-import.log:
* web-platform-tests/mathml/tools/mathvariant-transforms.py:
* web-platform-tests/mathml/tools/operator-dictionary.py: Added.
(parseHexaNumber):
(parseHexaSequence):
(parseSpaces):
(parseProperties):
(buildKeyAndValueFrom):
(createSizeVariants):
(createStretchy):
* web-platform-tests/mathml/tools/operator-dictionary.xsl: Added.
* web-platform-tests/mathml/tools/utils/misc.py:
* web-platform-tests/mathml/tools/utils/w3c-import.log:
* web-platform-tests/mathml/tools/w3c-import.log:

LayoutTests:

* TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/dir-mo-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt: Added.
* platform/ios-wk1/imported/w3c/web-platform-tests/matml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
* platform/ios-wk1/imported/w3c/web-platform-tests/matml/relations/css-styling/ignored-properties-001-expected.txt: Added.
* platform/mac/TestExpectations:
* tests-options.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250127 268f45cc-cd09-0410-ab3c-d52691b4dbfc

128 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/import-expectations.json
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-006.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-007.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-008.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-009.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-010.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001-expected.txt
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002-expected.txt
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-form-dynamic.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-form-fallback.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-form.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-paint-lspace-rspace.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-like-004-expected.txt
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-like-004.html
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/displaystyle-011.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/displaystyle-012.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/displaystyle-013.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/displaystyle-014.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/displaystyle-015.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-auto.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-bold-italic.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-bold-script.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-bold.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-double-struck.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-fraktur.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-initial.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-italic.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-looped.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-monospace.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-script.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-stretched.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-tailed.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/not-participating-to-parent-layout.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-002.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/width-height-001.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative-expected.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/display-2-expected.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/display-2.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-001.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-002.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/support/box-navigation.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/support/feature-detection.js
LayoutTests/imported/w3c/web-platform-tests/mathml/support/mathml-fragments.js
LayoutTests/imported/w3c/web-platform-tests/mathml/support/operator-dictionary.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/support/operator-dictionary.json [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/support/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/tools/mathvariant-transforms.py
LayoutTests/imported/w3c/web-platform-tests/mathml/tools/operator-dictionary.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/tools/operator-dictionary.xsl [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/mathml/tools/utils/misc.py
LayoutTests/imported/w3c/web-platform-tests/mathml/tools/utils/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/mathml/tools/w3c-import.log
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/dir-mo-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-wk1/imported/w3c/web-platform-tests/matml/presentation-markup/operators/operator-dictionary-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-wk1/imported/w3c/web-platform-tests/matml/relations/css-styling/ignored-properties-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations
LayoutTests/tests-options.json

index 92a0568..9524ddf 100644 (file)
@@ -1,3 +1,26 @@
+2019-09-20  Rob Buis  <rbuis@igalia.com>
+
+        Synchronize MathML WPT tests against upstream
+        https://bugs.webkit.org/show_bug.cgi?id=201975
+
+        Reviewed by Frédéric Wang.
+
+        * TestExpectations:
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/dir-mo-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt: Added.
+        * platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt: Added.
+        * platform/ios-wk1/imported/w3c/web-platform-tests/matml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
+        * platform/ios-wk1/imported/w3c/web-platform-tests/matml/relations/css-styling/ignored-properties-001-expected.txt: Added.
+        * platform/mac/TestExpectations:
+        * tests-options.json:
+
 2019-09-19  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Canvas: show WebGPU shader pipelines
index 7fc03d3..b47e950 100644 (file)
@@ -1095,6 +1095,8 @@ webkit.org/b/194952 imported/w3c/web-platform-tests/mathml/presentation-markup/f
 webkit.org/b/194952 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-color-001.html  [ ImageOnlyFailure ]
 webkit.org/b/194952 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-003.html [ ImageOnlyFailure ]
 webkit.org/b/187039 imported/w3c/web-platform-tests/mathml/relations/html5-tree/href-click-3.html [ Skip ]
+imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html [ ImageOnlyFailure ]
+imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-numalign-denomalign-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-gap-001.html [ ImageOnlyFailure ]
@@ -1103,7 +1105,12 @@ imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parame
 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-gap-004.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-gap-005.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-gap-006.html [ ImageOnlyFailure ]
+imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html [ ImageOnlyFailure ]
+imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-form-dynamic.html [ ImageOnlyFailure ]
+imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html [ ImageOnlyFailure ]
+imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html [ ImageOnlyFailure ]
+imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-1.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/relations/css-styling/mathbackground-001.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/mathml/relations/css-styling/mathbackground-002.html [ ImageOnlyFailure ]
index 90b93b8..950cd9d 100644 (file)
@@ -1,3 +1,149 @@
+2019-09-20  Rob Buis  <rbuis@igalia.com>
+
+        Synchronize MathML WPT tests against upstream
+        https://bugs.webkit.org/show_bug.cgi?id=201975
+
+        Reviewed by Frédéric Wang.
+
+        Sync is based on a3a4442b04c37155f81c4ad4ae9c06339f76ce14.
+
+        * resources/import-expectations.json:
+        * web-platform-tests/mathml/presentation-markup/direction/direction-006.html:
+        * web-platform-tests/mathml/presentation-markup/direction/direction-007.html:
+        * web-platform-tests/mathml/presentation-markup/direction/direction-008.html:
+        * web-platform-tests/mathml/presentation-markup/direction/direction-009.html:
+        * web-platform-tests/mathml/presentation-markup/direction/direction-010.html:
+        * web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002-expected.html: Added.
+        * web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html: Added.
+        * web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding-expected.html: Added.
+        * web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html: Added.
+        * web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow-expected.html: Added.
+        * web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html: Added.
+        * web-platform-tests/mathml/presentation-markup/fractions/w3c-import.log:
+        * web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation-expected.html: Added.
+        * web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html: Added.
+        * web-platform-tests/mathml/presentation-markup/menclose/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/w3c-import.log.
+        * web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt: Added.
+        * web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001.html: Added.
+        * web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002-expected.html: Added.
+        * web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html: Added.
+        * web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt: Added.
+        * web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html: Added.
+        * web-platform-tests/mathml/presentation-markup/mrow/w3c-import.log:
+        * web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001-expected.txt:
+        * web-platform-tests/mathml/presentation-markup/operators/embellished-operator-001.html:
+        * web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002-expected.txt:
+        * web-platform-tests/mathml/presentation-markup/operators/embellished-operator-002.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-form-dynamic.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-form-fallback.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-form.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-default.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow-expected.html: Added.
+        * web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html: Added.
+        * web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html:
+        * web-platform-tests/mathml/presentation-markup/operators/mo-paint-lspace-rspace.html:
+        * web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt: Added.
+        * web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html: Added.
+        * web-platform-tests/mathml/presentation-markup/operators/w3c-import.log:
+        * web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow-expected.html: Added.
+        * web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html: Added.
+        * web-platform-tests/mathml/presentation-markup/radicals/w3c-import.log:
+        * web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt: Added.
+        * web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html: Added.
+        * web-platform-tests/mathml/presentation-markup/scripts/w3c-import.log:
+        * web-platform-tests/mathml/presentation-markup/spaces/space-like-004-expected.txt:
+        * web-platform-tests/mathml/presentation-markup/spaces/space-like-004.html:
+        * web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt: Added.
+        * web-platform-tests/mathml/presentation-markup/tables/table-001.html: Added.
+        * web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt: Added.
+        * web-platform-tests/mathml/presentation-markup/tables/table-002.html: Added.
+        * web-platform-tests/mathml/presentation-markup/tables/w3c-import.log:
+        * web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html:
+        * web-platform-tests/mathml/relations/css-styling/displaystyle-011.html:
+        * web-platform-tests/mathml/relations/css-styling/displaystyle-012.html:
+        * web-platform-tests/mathml/relations/css-styling/displaystyle-013.html:
+        * web-platform-tests/mathml/relations/css-styling/displaystyle-014.html:
+        * web-platform-tests/mathml/relations/css-styling/displaystyle-015.html:
+        * web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Added.
+        * web-platform-tests/mathml/relations/css-styling/ignored-properties-001.html: Added.
+        * web-platform-tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html:
+        * web-platform-tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-auto.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-bold-italic.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-bold-script.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-bold.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-double-struck.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-fraktur.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-initial.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-italic.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-looped.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-monospace.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-sans-serif.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-script.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-stretched.html:
+        * web-platform-tests/mathml/relations/css-styling/mathvariant-tailed.html:
+        * web-platform-tests/mathml/relations/css-styling/not-participating-to-parent-layout.html:
+        * web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html:
+        * web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-002.html:
+        * web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002.html:
+        * web-platform-tests/mathml/relations/css-styling/w3c-import.log:
+        * web-platform-tests/mathml/relations/css-styling/width-height-001.html:
+        * web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt:
+        * web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html:
+        * web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative-expected.html:
+        * web-platform-tests/mathml/relations/html5-tree/display-2-expected.html: Added.
+        * web-platform-tests/mathml/relations/html5-tree/display-2.html: Added.
+        * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
+        * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html:
+        * web-platform-tests/mathml/relations/html5-tree/tabindex-001-expected.txt: Added.
+        * web-platform-tests/mathml/relations/html5-tree/tabindex-001.html: Added.
+        * web-platform-tests/mathml/relations/html5-tree/tabindex-002-expected.txt: Added.
+        * web-platform-tests/mathml/relations/html5-tree/tabindex-002.html: Added.
+        * web-platform-tests/mathml/relations/html5-tree/w3c-import.log:
+        * web-platform-tests/mathml/support/box-navigation.js: Added.
+        (IsInFlow):
+        (firstInFlowChild):
+        (nextInFlowSibling):
+        (previousInFlowSibling):
+        * web-platform-tests/mathml/support/feature-detection.js:
+        (MathMLFeatureDetection.string_appeared_here):
+        (MathMLFeatureDetection.has_mspace): Deleted.
+        (MathMLFeatureDetection.has_operator_spacing): Deleted.
+        (MathMLFeatureDetection.has_mfrac): Deleted.
+        (MathMLFeatureDetection.has_msqrt): Deleted.
+        (MathMLFeatureDetection.has_menclose): Deleted.
+        (MathMLFeatureDetection.has_dir): Deleted.
+        * web-platform-tests/mathml/support/mathml-fragments.js:
+        (FragmentHelper.createElement):
+        (FragmentHelper.forceNonEmptyElement):
+        (FragmentHelper.forceNonEmptyDescendants):
+        * web-platform-tests/mathml/support/operator-dictionary.js: Added.
+        (async.fetchOperatorDictionary):
+        (splitKey):
+        (spaceIndexToLength):
+        (defaultPropertyValue):
+        * web-platform-tests/mathml/support/operator-dictionary.json: Added.
+        * web-platform-tests/mathml/support/w3c-import.log:
+        * web-platform-tests/mathml/tools/mathvariant-transforms.py:
+        * web-platform-tests/mathml/tools/operator-dictionary.py: Added.
+        (parseHexaNumber):
+        (parseHexaSequence):
+        (parseSpaces):
+        (parseProperties):
+        (buildKeyAndValueFrom):
+        (createSizeVariants):
+        (createStretchy):
+        * web-platform-tests/mathml/tools/operator-dictionary.xsl: Added.
+        * web-platform-tests/mathml/tools/utils/misc.py:
+        * web-platform-tests/mathml/tools/utils/w3c-import.log:
+        * web-platform-tests/mathml/tools/w3c-import.log:
+
 2019-09-17  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, address flakiness of imported/w3c/web-platform-tests/html/browsers/offline/application-cache-api/api_update_error.https.html.
index 97c108f..906d11a 100644 (file)
     "web-platform-tests/html/dom/reflection-original.html": "skip", 
     "web-platform-tests/html/editing": "skip", 
     "web-platform-tests/html/iana": "skip", 
-    "web-platform-tests/html/infrastructure": "skip",
+    "web-platform-tests/html/infrastructure": "skip", 
     "web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers": "skip", 
     "web-platform-tests/html/obsolete": "skip", 
     "web-platform-tests/html/rendering": "skip", 
     "web-platform-tests/longtask-timing": "skip", 
     "web-platform-tests/magnetometer": "skip", 
     "web-platform-tests/mathml": "import", 
-    "web-platform-tests/mathml/relations/html5-tree": "import", 
     "web-platform-tests/media-capabilities": "skip", 
     "web-platform-tests/media-source": "import", 
     "web-platform-tests/mediacapture-image": "skip", 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002-expected.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002-expected.html
new file mode 100644 (file)
index 0000000..9d5eef8
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>fractions bar</title>
+    <style type="text/css">
+      #green {
+          position: absolute;
+          background: green;
+          width: 150px;
+          height: 150px;
+          left: 50px;
+          top: 50px;
+      }
+    </style>
+  </head>
+  <body>
+    <p>This test passes if you see a green <strong>square</strong> and no red.</p>
+    <div>
+      <div id="green"></div>
+    </div>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html
new file mode 100644 (file)
index 0000000..ccf1bd9
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <head>
+    <meta charset="utf-8">
+    <title>fractions bar</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fractions-mfrac">
+    <meta name="assert" content="Verify painting of the fraction bar when margin/padding/border are involved.">
+    <link rel="match" href="frac-bar-002-ref.html">
+    <style type="text/css">
+      @font-face {
+        font-family: TestFont;
+        src: url("/fonts/math/fraction-rulethickness10000.woff");
+      }
+      math {
+        /* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
+        /* The gap / shift / axisheight parameters are set to 0. */
+        font-family: "TestFont";
+        font-size: 1px;
+      }
+      #container {
+          position: absolute;
+          left: 0;
+          top: 0;
+      }
+      #red {
+          position: absolute;
+          background: red;
+          margin: 1px;
+          width: 148px;
+          height: 148px;
+      }
+    </style>
+    <script src="/common/reftest-wait.js"></script>
+    <script>
+      window.addEventListener("load", () => { document.fonts.ready.then(adjustPositionOfFraction); });
+
+      function adjustPositionOfFraction()
+      {
+          requestAnimationFrame(() => {
+              var container = document.getElementById("container");
+              var red = document.getElementById("red");
+              var numeratorBox = document.getElementById("numerator").getBoundingClientRect();
+              const shift = 50;
+              const numeratorMargin = 20;
+
+              /* Move the red square at the expected position,
+                 with a 1px gap to avoid antialiasing issues. */
+              red.style.left = `${shift}px`;
+              red.style.top = `${shift}px`;
+
+              /* Move the fraction bar at the expected position. */
+              container.style.left = (shift - numeratorBox.left + numeratorMargin) + "px";
+              container.style.top = (shift - numeratorBox.bottom - numeratorMargin) + "px";
+              requestAnimationFrame(takeScreenshot);
+        });
+      }
+    </script>
+  </head>
+  <body>
+    <p>This test passes if you see a green <strong>square</strong> and no red.</p>
+    <div>
+      <div id="red"></div>
+      <div id="container">
+        <math>
+          <!-- border, padding and margin should not affect the width of the fraction bar. -->
+          <mfrac style="color: green; font-size: 15em;
+                        border: 30px solid transparent;
+                        padding: 60px; margin: 120px;
+                        ">
+            <!-- the bar width is the one of the numerator margin box i.e. 80 + 2 * (5 + 10 + 20) = 150px -->
+            <mspace id="numerator" width="80px"
+                    style="border: 5px solid transparent;
+                           padding: 10px; margin: 20px;"></mspace>
+            <mspace></mspace>
+          </mfrac>
+        </math>
+      </div>
+    </div>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding-expected.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding-expected.html
new file mode 100644 (file)
index 0000000..93d3e01
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>fraction default padding</title>
+  </head>
+  <body>
+    <p>This test passes if you see three green squares of same size, separated by a gap of one pixel.</p>
+    <div>
+      <math>
+        <mspace width="150px" height="75px" depth="75px" style="background: green"/>
+        <mspace width="1px"/>
+        <mspace width="150px" height="75px" depth="75px" style="background: green"/>
+        <mspace width="1px"/>
+        <mspace width="150px" height="75px" depth="75px" style="background: green"/>
+      </math>
+    </div>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html
new file mode 100644 (file)
index 0000000..b68bb87
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>fraction default padding</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fractions-mfrac">
+    <meta name="assert" content="Verifies 1px padding is added around each side of the fraction.">
+    <link rel="match" href="frac-default-padding-ref.html">
+    <style type="text/css">
+      @font-face {
+        font-family: TestFont;
+        src: url("/fonts/math/fraction-rulethickness10000.woff");
+      }
+      math {
+        /* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
+        /* The gap / shift / axisheight parameters are set to 0. */
+        font-family: "TestFont";
+        font-size: 1px;
+      }
+    </style>
+  </head>
+  <body>
+    <p>This test passes if you see three green squares of same size, separated by a gap of one pixel.</p>
+    <div>
+      <math>
+        <mspace width="150px" height="75px" depth="75px" style="background: green"/>
+        <mfrac style="color: green; font-size: 15em">
+          <mspace id="numerator" width="150px"></mspace>
+          <mspace></mspace>
+        </mfrac>
+        <mspace width="150px" height="75px" depth="75px" style="background: green"/>
+      </math>
+    </div>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow-expected.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow-expected.html
new file mode 100644 (file)
index 0000000..71f1583
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>fraction rendering from in-flow children</title>
+  </head>
+  <body>
+    <math>
+      <mfrac>
+        <mspace width="64px" height="48px" style="background: lightblue"></mspace>
+        <mspace width="128px" height="96px" style="background: lightgreen"></mspace>
+      </mfrac>
+    </math>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html
new file mode 100644 (file)
index 0000000..ac9576f
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>fraction rendering from in-flow children</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fractions-mfrac">
+    <meta name="assert" content="Verify rendering of fractions is only affected by in-flow children.">
+    <style>
+      .oof1 {
+          position: absolute;
+      }
+      .oof2 {
+          position: fixed;
+      }
+      .nobox {
+          display: none;
+      }
+    </style>
+    <link rel="match" href="frac-rendering-from-in-flow-ref.html">
+  </head>
+  <body>
+    <math>
+      <mfrac>
+        <mspace height="32px" width="24px" class="oof1"/>
+        <mspace height="16px" width="12px" class="oof2"/>
+        <mspace height="8px" width="4px" class="nobox"/>
+        <mspace width="64px" height="48px" style="background: lightblue"></mspace>
+        <mspace height="32px" width="24px" class="oof1"/>
+        <mspace height="16px" width="12px" class="oof2"/>
+        <mspace height="8px" width="4px" class="nobox"/>
+        <mspace width="128px" height="96px" style="background: lightgreen"></mspace>
+        <mspace height="32px" width="24px" class="oof1"/>
+        <mspace height="16px" width="12px" class="oof2"/>
+        <mspace height="8px" width="4px" class="nobox"/>
+      </mfrac>
+    </math>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script>
+  </body>
+</html>
index 26a819e..f0ce567 100644 (file)
@@ -17,6 +17,8 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-1.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-001-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-001.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-bar-002.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-color-001-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-color-001-notref.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-color-001.html
@@ -28,6 +30,8 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-created-dynamically-3.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-created-dynamically-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-created-dynamically.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-default-padding.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002.html
@@ -54,5 +58,7 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-gap-005.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-gap-006-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-gap-006.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-rendering-from-in-flow.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-visibility-001-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-visibility-001.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation-expected.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation-expected.html
new file mode 100644 (file)
index 0000000..f0b5bdd
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>Legacy menclose radical notation (reference)</title>
+    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+    <style>
+      math, math * {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
+  <body>
+    <math>
+      <menclose>
+        <mn>123</mn>
+      </menclose>
+    </math>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html
new file mode 100644 (file)
index 0000000..d7f0627
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <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">
+    <meta name="assert" content="Verify that the legacy menclose radical notation is not supported.">
+    <link rel="match" href="legacy-menclose-radical-notation-ref.html">
+    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+    <style>
+      math, math * {
+          font: 25px Ahem;
+      }
+    </style>
+  </head>
+  <body>
+    <math>
+      <menclose notation="radical">
+        <mn>123</mn>
+      </menclose>
+    </math>
+
+   <script src="/mathml/support/feature-detection.js"></script>
+   <script>MathMLFeatureDetection.ensure_for_match_reftest("has_menclose");</script>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/w3c-import.log
new file mode 100644 (file)
index 0000000..d598ef5
--- /dev/null
@@ -0,0 +1,18 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/menclose/legacy-menclose-radical-notation.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001-expected.txt
new file mode 100644 (file)
index 0000000..61a393d
--- /dev/null
@@ -0,0 +1,33 @@
+
+PASS Element is laid out as an mrow with only first child displayed (id=semantics) 
+FAIL Computed display of children (id=semantics) assert_equals: First child has display: math expected "math" but got "block"
+PASS Element is laid out as an mrow with only first child displayed (id=semantics-annotations) 
+FAIL Computed display of children (id=semantics-annotations) assert_equals: First child has display: math expected "math" but got "block"
+PASS Element is laid out as an mrow with only first child displayed (id=maction) 
+FAIL Computed display of children (id=maction) assert_equals: First child has display: math expected "math" but got "block"
+PASS Element is laid out as an mrow with only first child displayed (id=maction-toggle) 
+FAIL Computed display of children (id=maction-toggle) assert_equals: First child has display: math expected "math" but got "block"
+FAIL Element is laid out as an mrow with only first child displayed (id=maction-toggle-selection) assert_approx_equals: block size expected 10 +/- 1 but got 20
+FAIL Computed display of children (id=maction-toggle-selection) assert_equals: First child has display: math expected "math" but got "block"
+PASS Element is laid out as an mrow with only first child displayed (id=maction-statusline) 
+FAIL Computed display of children (id=maction-statusline) assert_equals: First child has display: math expected "math" but got "block"
+PASS Element is laid out as an mrow with only first child displayed (id=maction-tooltip) 
+FAIL Computed display of children (id=maction-tooltip) assert_equals: First child has display: math expected "math" but got "block"
+PASS Element is laid out as an mrow with only first child displayed (id=maction-input) 
+FAIL Computed display of children (id=maction-input) assert_equals: First child has display: math expected "math" but got "block"
+
+
+
+
+
+
+
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001.html
new file mode 100644 (file)
index 0000000..ad9f2d2
--- /dev/null
@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Legacy maction and semantics elements</title>
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.maction">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enlivening-expressions">
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.semantics">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#semantics-and-presentation">
+<meta name="assert" content="Legacy maction and semantics elements are handled as mrow with special style">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/layout-comparison.js"></script>
+<script type="text/javascript">
+  setup({ explicit_done: true });
+  window.addEventListener("load", runTests);
+  function runTests()
+  {
+      Array.from(document.getElementsByClassName("TestContainer")).forEach(container => {
+          const id = container.id;
+          const math = container.getElementsByTagName("math");
+          test(function() {
+              assert_true(MathMLFeatureDetection.has_mspace(), "<mspace> is supported");
+              const epsilon = 1;
+              compareLayout(math[0], math[1], epsilon);
+          }, `Element is laid out as an mrow with only first child displayed (id=${id})`);
+
+          test(function() {
+              assert_true(MathMLFeatureDetection.has_mspace(), "<mspace> is supported");
+              let firstChild = math[0].firstElementChild.firstElementChild;
+              for (var child = firstChild; child; child = child.nextElementSibling) {
+                  var style = window.getComputedStyle(child).getPropertyValue("display");
+                  if (child == firstChild) {
+                      assert_equals(style, "math", "First child has display: math");
+                  } else {
+                      assert_equals(style, "none", "Other children have display: none");
+                  }
+              }
+          }, `Computed display of children (id=${id})`);
+      });
+      done();
+  }
+</script>
+<style>
+  mspace:nth-child(2n) {
+      background: lightblue;
+  }
+  mspace:nth-child(2n+1) {
+      background: lightgreen;
+  }
+  mrow.onlyShowFirstChild > :not(:first-child) {
+      display: none;
+  }
+</style>
+</head>
+<body>
+  <div id="log"></div>
+  <p class="TestContainer" id="semantics">
+    <math>
+      <semantics>
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </semantics>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </mrow>
+    </math>
+  </p>
+  <p class="TestContainer" id="semantics-annotations">
+    <math>
+      <semantics>
+        <mspace width="10px" height="10px"></mspace>
+        <annotation>ANNOTATION</annotation>
+        <annotation-xml>ANNOTATION-XML</annotation-xml>
+      </semantics>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+        <annotation>ANNOTATION</annotation>
+        <annotation-xml>ANNOTATION-XML</annotation-xml>
+      </mrow>
+    </math>
+  </p>
+  <p class="TestContainer" id="maction">
+    <math>
+      <maction>
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </maction>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </mrow>
+    </math>
+  </p>
+  <p class="TestContainer" id="maction-toggle">
+    <math>
+      <maction actiontype="toggle">
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </maction>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </mrow>
+    </math>
+  </p>
+  <p class="TestContainer" id="maction-toggle-selection">
+    <math>
+      <maction actiontype="toggle" selection="3">
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </maction>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+        <mspace width="10px" depth="10px"></mspace>
+        <mspace width="10px" height="15px" depth="5px"></mspace>
+        <mspace width="10px" height="5px" depth="15px"></mspace>
+      </mrow>
+    </math>
+  </p>
+  <p class="TestContainer" id="maction-statusline">
+    <math>
+      <maction actiontype="statusline">
+        <mspace width="10px" height="10px"></mspace>
+        <mtext>MESSAGE</mtext>
+      </maction>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+        <mtext>MESSAGE</mtext>
+      </mrow>
+    </math>
+  </p>
+  <p class="TestContainer" id="maction-tooltip">
+    <math>
+      <maction actiontype="tooltip">
+        <mspace width="10px" height="10px"></mspace>
+        <mtext>MESSAGE</mtext>
+      </maction>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+        <mtext>MESSAGE</mtext>
+      </mrow>
+    </math>
+  </p>
+  <p class="TestContainer" id="maction-input">
+    <math>
+      <maction actiontype="input">
+        <mspace width="10px" height="10px"></mspace>
+      </maction>
+    </math>
+    <math>
+      <mrow class="onlyShowFirstChild">
+        <mspace width="10px" height="10px"></mspace>
+      </mrow>
+    </math>
+  </p>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002-expected.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002-expected.html
new file mode 100644 (file)
index 0000000..0c26780
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Legacy maction and semantics elements (reference)</title>
+</head>
+<body>
+  <p>This test passes if you see 4 green squares and no red.</p>
+  <p>
+    <math>
+      <mrow>
+        <mtext>
+          <span style="display: inline-block; width: 50px; height: 50px; background: green;"></span>
+        </mtext>
+      </mrow>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mrow>
+        <mrow style="display: inline-block">
+          <span style="display: inline-block; width: 50px; height: 50px; background: green;"></span>
+        </mrow>
+      </mrow>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mrow>
+        <mspace style="background: green" width="50px" height="50px"></mspace>
+      </mrow>
+    </math>
+  </p>
+  <p>
+    <math>
+      <maction actiontype="toggle" selection="2">
+        <mspace style="display: none; background: red" width="50px" height="50px"></mspace>
+        <mspace style="display: math; background: green" width="50px" height="50px"></mspace>
+        <mspace style="background: red" width="50px" height="50px"></mspace>
+      </maction>
+    </math>
+  </p>
+  <script src="/mathml/support/feature-detection.js"></script>
+  <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html
new file mode 100644 (file)
index 0000000..7c350f9
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Legacy maction and semantics elements</title>
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.maction">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enlivening-expressions">
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.semantics">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#semantics-and-presentation">
+<meta name="assert" content="Verify that one can override the default rendering legacy maction and semantics elements using the display property">
+<link rel="match" href="legacy-mrow-like-elements-002-ref.html">
+</head>
+<body>
+  <p>This test passes if you see 4 green squares and no red.</p>
+  <p>
+    <math>
+      <semantics>
+        <mspace style="display: none; background: red;" width="50px" height="50px"></mspace>
+        <mspace style="background: red;" width="50px" height="50px"></mspace>
+        <annotation style="display: math">
+          <span style="display: inline-block; width: 50px; height: 50px; background: green;"></span>
+        </annotation>
+      </semantics>
+    </math>
+  </p>
+  <p>
+    <math>
+      <semantics>
+        <mspace style="display: none; background: red;" width="50px" height="50px"></mspace>
+        <mspace style="background: red;" width="50px" height="50px"></mspace>
+        <annotation-xml style="display: inline-block" encoding="text/html">
+          <span style="display: inline-block; width: 50px; height: 50px; background: green;"></span>
+        </annotation-xml>
+      </semantics>
+    </math>
+  </p>
+  <p>
+    <math>
+      <maction actiontype="toggle">
+        <mspace style="display: none; background: red" width="50px" height="50px"></mspace>
+        <mspace style="display: math; background: green" width="50px" height="50px"></mspace>
+      </maction>
+    </math>
+  </p>
+  <p>
+    <math>
+      <maction actiontype="toggle" selection="2">
+        <mspace style="display: none; background: red" width="50px" height="50px"></mspace>
+        <mspace style="display: math; background: green" width="50px" height="50px"></mspace>
+        <mspace style="background: red" width="50px" height="50px"></mspace>
+      </maction>
+    </math>
+  </p>
+  <script src="/mathml/support/feature-detection.js"></script>
+  <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes-expected.txt
new file mode 100644 (file)
index 0000000..9dbb21e
--- /dev/null
@@ -0,0 +1,44 @@
+
+PASS Legacy mstyle attributes do not apply to mspace 
+PASS Legacy mstyle attributes do not apply to mfrac 
+PASS Legacy mstyle attributes do not apply to mo 
+PASS Legacy mstyle attributes do not apply to menclose 
+PASS Legacy mstyle attributes do not apply to ms 
+
+1
+2
+1
+2
+
+1
+A
+2
+∑
+3
+4
+⇀
+|
+|
+4
+1
+A
+2
+∑
+3
+4
+⇀
+|
+|
+4
+
+1
+1
+
+1
+1
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html
new file mode 100644 (file)
index 0000000..0de9a90
--- /dev/null
@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Legacy mstyle attributes</title>
+<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.mstyle">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#style-change-mstyle">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#space-mspace">
+<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">
+<meta name="assert" content="Legacy mstyle attributes are ignored">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/layout-comparison.js"></script>
+<script type="text/javascript">
+  setup({ explicit_done: true });
+  window.addEventListener("load", runTests);
+  function runTests()
+  {
+      Array.from(document.getElementsByClassName("TestContainer")).forEach(container => {
+          const tag = container.id;
+          test(function() {
+              assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
+              const epsilon = 1;
+              const math = container.getElementsByTagName("math");
+              compareLayout(math[0], math[1], epsilon);
+          }, `Legacy mstyle attributes do not apply to ${tag}`);
+      });
+      done();
+  }
+</script>
+</head>
+<body>
+  <div id="log"></div>
+  <!-- Note: mpadded attributes are not tested since MathML3 did not allow to
+       set them from mstyle. Also, it is not clear whether munderover's
+       accent/accentunder could be applied from mstyle, given that the former
+       clashes with mo@accent. Other legacy mstyle attributes not in MathML
+       Core or without visual effect are not tested.
+    -->
+  <p class="TestContainer" id="mspace">
+    <math>
+      <mstyle width="50px" height="50px" depth="50px">
+        <mspace style="background: lightblue"></mspace>
+      </mstyle>
+    </math>
+    <math>
+      <mstyle>
+        <mspace style="background: lightblue"></mspace>
+      </mstyle>
+    </math>
+  </p>
+  <p class="TestContainer" id="mfrac">
+    <math>
+      <mstyle linethickness="50px">
+        <mfrac>
+          <mn>1</mn>
+          <mn>2</mn>
+        </mfrac>
+      </mstyle>
+    </math>
+    <math>
+      <mstyle>
+        <mfrac>
+          <mn>1</mn>
+          <mn>2</mn>
+        </mfrac>
+      </mstyle>
+    </math>
+  </p>
+  <p class="TestContainer" id="mo">
+    <math displaystyle="true">
+      <mstyle lspace="50px" rspace="50px">
+        <mn>1</mn>
+        <mo>A</mo>
+        <mn>2</mn>
+      </mstyle>
+      <mstyle movablelimits="false" largeop="false">
+        <munder>
+          <mo>∑</mo>
+          <mn>3</mn>
+        </munder>
+      </mstyle>
+      <mstyle accent="false">
+        <mover>
+          <mn>4</mn>
+          <mo>⇀</mo>
+        </mover>
+      </mstyle>
+      <mstyle stretchy="false" symmetric="false" maxsize="20px">
+        <mrow>
+          <mo>|</mo>
+          <mspace height="100px"></mspace>
+        </mrow>
+      </mstyle>
+      <mstyle minsize="100px">
+        <mrow>
+          <mo>|</mo>
+          <mn>4</mn>
+        </mrow>
+      </mstyle>
+    </math>
+    <math displaystyle="true">
+      <mstyle>
+        <mn>1</mn>
+        <mo>A</mo>
+        <mn>2</mn>
+      </mstyle>
+      <mstyle>
+        <munder>
+          <mo>∑</mo>
+          <mn>3</mn>
+        </munder>
+      </mstyle>
+      <mstyle>
+        <mover>
+          <mn>4</mn>
+          <mo>⇀</mo>
+        </mover>
+      </mstyle>
+      <mstyle>
+        <mrow>
+          <mo>|</mo>
+          <mspace height="100px"></mspace>
+        </mrow>
+      </mstyle>
+      <mstyle>
+        <mrow>
+          <mo>|</mo>
+          <mn>4</mn>
+        </mrow>
+      </mstyle>
+    </math>
+  </p>
+  <p class="TestContainer" id="menclose">
+    <math>
+      <mstyle notation="box">
+        <mn>1</mn>
+      </mstyle>
+    </math>
+    <math>
+      <mstyle>
+        <mn>1</mn>
+      </mstyle>
+    </math>
+  </p>
+  <p class="TestContainer" id="ms">
+    <math>
+      <mstyle lquote="AAAA" rquote="BBBB">
+        <ms>1</ms>
+      </mstyle>
+    </math>
+    <math>
+      <mstyle>
+        <ms>1</ms>
+      </mstyle>
+    </math>
+  </p>
+</body>
+</html>
index c93b97f..49a51a7 100644 (file)
@@ -16,3 +16,7 @@ None
 List of files:
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-baseline.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-001.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mrow-like-elements-002.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html
index 2802b73..e77c6ff 100644 (file)
@@ -1,12 +1,20 @@
 
 FAIL mrow (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mrow (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 FAIL mrow (not embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mrow (not embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 FAIL mstyle (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mstyle (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 FAIL mstyle (not embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mstyle (not embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 FAIL mphantom (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mphantom (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 FAIL mphantom (not embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mphantom (not embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 FAIL mpadded (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mpadded (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 FAIL mpadded (not embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mpadded (not embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 X
 X
 X
@@ -17,27 +25,108 @@ X
 X
 X
 
+01
 X
+01
+01
 X
+01
 X
+01
+01
+X
+01
 
+01
 X
+01
+01
 X
+01
 X
+01
+01
 X
+01
 
 X
 X
+X
 
 X
 X
+X
+X
 
+01
 X
+01
+01
 X
+01
+01
 X
+01
 
+01
 X
+01
+01
 X
+01
 X
+01
+01
 X
+01
 
+X
+X
+
+X
+X
+
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+
+X
+X
+X
+
+X
+X
+X
+X
+
+01
+X
+01
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
index 78c5069..31bdff2 100644 (file)
@@ -11,6 +11,7 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/box-navigation.js"></script>
 <style>
   /* Default spacing of operator 'X' is 0.2777777777777778em so quite different
      from the measured/specified 0em and 1em. */
       color: blue !important;
       background: blue !important;
   }
+  .oof1 {
+      position: absolute;
+  }
+  .oof2 {
+      position: fixed;
+  }
+  .nobox {
+      display: none;
+  }
 </style>
 <script>
   function spaceBeforeElement(id) {
       var element = document.getElementById(id);
-      var mnBefore = element.previousElementSibling;
+      var mnBefore = previousInFlowSibling(element);
       return element.getBoundingClientRect().left - mnBefore.getBoundingClientRect().right;
   }
 
       ["mrow", "mstyle", "mphantom", "mpadded"].forEach(tag => {
           test(function() {
               assert_true(MathMLFeatureDetection.has_operator_spacing());
-              assert_approx_equals(spaceBeforeElement(`${tag}-op`), 2 * emToPx, epsilon);
-              assert_approx_equals(spaceBeforeCoreOperator(`${tag}-op`), 0, epsilon);
+              assert_approx_equals(spaceBeforeElement(`${tag}-op-1`), 2 * emToPx, epsilon);
+              assert_approx_equals(spaceBeforeCoreOperator(`${tag}-op-1`), 0, epsilon);
           }, `${tag} (embellished operator)`);
 
           test(function() {
               assert_true(MathMLFeatureDetection.has_operator_spacing());
-              assert_approx_equals(spaceBeforeElement(`${tag}-nonop`), 0, epsilon);
-              assert_approx_equals(spaceBeforeCoreOperator(`${tag}-nonop`), 2 * emToPx, epsilon);
+              assert_approx_equals(spaceBeforeElement(`${tag}-op-2`), 2 * emToPx, epsilon);
+              assert_approx_equals(spaceBeforeCoreOperator(`${tag}-op-2`), 0, epsilon);
+          }, `${tag} (embellished operator, from in-flow children)`);
+
+          test(function() {
+              assert_true(MathMLFeatureDetection.has_operator_spacing());
+              assert_approx_equals(spaceBeforeElement(`${tag}-nonop-1`), 0, epsilon);
+              assert_approx_equals(spaceBeforeCoreOperator(`${tag}-nonop-1`), 2 * emToPx, epsilon);
           }, `${tag} (not embellished operator)`);
+
+          test(function() {
+              assert_true(MathMLFeatureDetection.has_operator_spacing());
+              assert_approx_equals(spaceBeforeElement(`${tag}-nonop-2`), 0, epsilon);
+              assert_approx_equals(spaceBeforeCoreOperator(`${tag}-nonop-2`), 2 * emToPx, epsilon);
+          }, `${tag} (not embellished operator, from in-flow children)`);
       });
 
       done();
 </head>
 <body>
   <div id="log"></div>
+  <!-- mrow is an embellished operator if its in-flow children consist
+       of one embellished operator and zero or more space-like elements. -->
+  <p>
+    <math>
+      <mn>X</mn>
+      <mrow id="mrow-op-1" class="testedElement">
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mtext class="space-like">X</mtext>
+      </mrow>
+      <mn>X</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn>X</mn>
+      <mrow id="mrow-nonop-1" class="testedElement">
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn>X</mn> <!-- "mn" is not space-like -->
+      </mrow>
+      <mn>X</mn>
+    </math>
+  </p>
   <p>
     <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       <mn>X</mn>
-      <mrow id="mrow-op" class="testedElement">
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mrow id="mrow-op-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
         <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
         <mtext class="space-like">X</mtext>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       </mrow>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
     </math>
   </p>
   <p>
     <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       <mn>X</mn>
-      <mrow id="mrow-nonop" class="testedElement">
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mrow id="mrow-nonop-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
         <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
         <mn>X</mn> <!-- "mn" is not space-like -->
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       </mrow>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
     </math>
   </p>
-  <!-- mstyle is an embellished operator if its children consist
+  <!-- mstyle is an embellished operator if its in-flow children consist
        of one embellished operator and zero or more space-like elements. -->
   <p>
     <math>
       <mn>X</mn>
-      <mstyle id="mstyle-op" class="testedElement">
+      <mstyle id="mstyle-op-1" class="testedElement">
         <mo lspace="2em" rspace="0em">X</mo>
       </mstyle>
       <mn>X</mn>
   <p>
     <math>
       <mn>X</mn>
-      <mstyle id="mstyle-nonop" class="testedElement">
+      <mstyle id="mstyle-nonop-1" class="testedElement">
         <mo lspace="2em" rspace="0em">X</mo>
         <mn>X</mn> <!-- "mn" is not space-like -->
       </mstyle>
       <mn>X</mn>
     </math>
   </p>
-  <!-- mphantom is an embellished operator if its children consist
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mstyle id="mstyle-op-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mstyle>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mstyle id="mstyle-nonop-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn> <!-- "mn" is not space-like -->
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mstyle>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <!-- mphantom is an embellished operator if its in-flow children consist
        of one embellished operator and zero or more space-like elements. -->
   <p>
     <math>
       <mn>X</mn>
-      <mphantom id="mphantom-op" class="testedElement">
+      <mphantom id="mphantom-op-1" class="testedElement">
         <mo lspace="2em" rspace="0em">X</mo>
       </mphantom>
       <mn>X</mn>
   <p>
     <math>
       <mn>X</mn>
-      <mphantom id="mphantom-nonop" class="testedElement">
+      <mphantom id="mphantom-nonop-1" class="testedElement">
         <mo lspace="2em" rspace="0em">X</mo>
         <mn>X</mn> <!-- "mn" is not space-like -->
       </mphantom>
       <mn>X</mn>
     </math>
   </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mphantom id="mphantom-op-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mphantom>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mphantom id="mphantom-nonop-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn> <!-- "mn" is not space-like -->
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mphantom>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
   <!-- mpadded is an embellished operator if its children consist
        of one embellished operator and zero or more space-like elements. -->
   <p>
     <math>
       <mn>X</mn>
-      <mpadded id="mpadded-op" class="testedElement">
+      <mpadded id="mpadded-op-1" class="testedElement">
+        <mo lspace="2em" rspace="0em">X</mo>
+      </mpadded>
+      <mn>X</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn>X</mn>
+      <mpadded id="mpadded-nonop-1" class="testedElement">
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn>X</mn> <!-- "mn" is not space-like -->
+      </mpadded>
+      <mn>X</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mpadded id="mpadded-op-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
         <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       </mpadded>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
     </math>
   </p>
   <p>
     <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       <mn>X</mn>
-      <mpadded id="mpadded-nonop" class="testedElement">
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mpadded id="mpadded-nonop-2" class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
         <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
         <mn>X</mn> <!-- "mn" is not space-like -->
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       </mpadded>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
       <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
     </math>
   </p>
 </body>
index b540729..2e3e782 100644 (file)
@@ -1,24 +1,44 @@
 
 FAIL msub (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL msub (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS msub (not embellished operator) 
+PASS msub (not embellished operator, from in-flow children) 
 FAIL msup (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL msup (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS msup (not embellished operator) 
+PASS msup (not embellished operator, from in-flow children) 
 FAIL msubsup (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL msubsup (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS msubsup (not embellished operator) 
+PASS msubsup (not embellished operator, from in-flow children) 
 FAIL munder (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL munder (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS munder (not embellished operator) 
+PASS munder (not embellished operator, from in-flow children) 
 FAIL mover (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mover (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS mover (not embellished operator) 
+PASS mover (not embellished operator, from in-flow children) 
 FAIL munderover (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL munderover (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS munderover (not embellished operator) 
+PASS munderover (not embellished operator, from in-flow children) 
 FAIL mmultiscripts (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mmultiscripts (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS mmultiscripts (not embellished operator) 
+PASS mmultiscripts (not embellished operator, from in-flow children) 
 FAIL mfrac (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL mfrac (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS mfrac (not embellished operator) 
+PASS mfrac (not embellished operator, from in-flow children) 
 FAIL maction (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL maction (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS maction (not embellished operator) 
+PASS maction (not embellished operator, from in-flow children) 
 FAIL semantics (embellished operator) assert_approx_equals: expected 50 +/- 1 but got 0
+FAIL semantics (embellished operator, from in-flow children) assert_approx_equals: expected 50 +/- 1 but got 0
 PASS semantics (not embellished operator) 
+PASS semantics (not embellished operator, from in-flow children) 
 X
 X
 X
@@ -71,6 +91,126 @@ X
 X
 X
 
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+X
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+X
+01
+X
+01
+
+01
+X
+01
+X
+01
+X
+01
+
 X
 X
 X
@@ -124,3 +264,126 @@ X
 X
 X
 
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+X
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
+
+01
+X
+01
+X
+01
+X
+01
+
+01
+X
+01
+01
+X
+01
+X
+01
+01
+X
+01
index da343dd..1bbed4e 100644 (file)
@@ -11,6 +11,7 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/box-navigation.js"></script>
 <style>
   /* Default spacing of operator 'X' is 0.2777777777777778em so quite different
      from the measured/specified 0em and 1em. */
       color: blue !important;
       background: blue !important;
   }
+  .oof1 {
+      position: absolute;
+  }
+  .oof2 {
+      position: fixed;
+  }
+  .nobox {
+      display: none;
+  }
 </style>
 <script>
   function spaceBeforeElement(element) {
-      var mnBefore = element.previousElementSibling;
+      var mnBefore = previousInFlowSibling(element);
       return element.getBoundingClientRect().left - mnBefore.getBoundingClientRect().right;
   }
 
            test(function() {
                assert_true(MathMLFeatureDetection.has_operator_spacing());
                var element = document.getElementsByTagName(tag)[1];
+               assert_approx_equals(spaceBeforeElement(element), 2 * emToPx, epsilon);
+           }, `${tag} (embellished operator, from in-flow children)`);
+
+           test(function() {
+               assert_true(MathMLFeatureDetection.has_operator_spacing());
+               var element = document.getElementsByTagName(tag)[2];
                assert_approx_equals(spaceBeforeElement(element), 0, epsilon);
            }, `${tag} (not embellished operator)`);
+
+           test(function() {
+               assert_true(MathMLFeatureDetection.has_operator_spacing());
+               var element = document.getElementsByTagName(tag)[3];
+               assert_approx_equals(spaceBeforeElement(element), 0, epsilon);
+           }, `${tag} (not embellished operator, from in-flow children)`);
       });
       done();
   }
@@ -66,7 +88,8 @@
   <div id="log"></div>
   <!-- <msub>, <msup>, <msubsup>, <munder>, <mover>, <munderover>,
        <mmultiscripts>, <mfrac>, <semantics> or <maction> are embellished
-       operators if their first child exists and is an embellished operator -->
+       operators if their first in-flow
+       child exists and is an embellished operator -->
   <p>
     <math>
       <mn>X</mn>
       <mn>X</mn>
     </math>
   </p>
+
+  <!-- Only in-flow children affect determination of embellished operators. -->
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msub class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msub>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msup class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msubsup class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msubsup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munder class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munder>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mover class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munderover class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munderover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mmultiscripts class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mmultiscripts>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mfrac class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mfrac>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <maction class="testedElement" actiontype="statusline">
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>STATUS MESSAGE</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </maction>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <semantics class="testedElement">
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <annotation>TEXT ANNOTATION</annotation>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </semantics>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+
   <!-- <msub>, <msup>, <msubsup>, <munder>, <mover>, <munderover>,
        <mmultiscripts>, <mfrac>, <semantics> or <maction> are not embellished
-       operators if their first child is not an embellished operator -->
+       operators if their first in-flow child is not an embellished operator -->
   <p>
     <math>
       <mn>X</mn>
       <mn>X</mn>
     </math>
   </p>
+
+  <!-- Only in-flow children affect determination of embellished operators. -->
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msub class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msub>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msup class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msubsup class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msubsup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munder class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munder>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mover class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munderover class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munderover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mmultiscripts class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mmultiscripts>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mfrac class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mfrac>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <maction class="testedElement" actiontype="statusline">
+        <mn>X</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="2em" rspace="0em">STATUS MESSAGE</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </maction>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <semantics class="testedElement">
+        <mrow>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mn>X</mn>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mo lspace="2em" rspace="0em">X</mo>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </mrow>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <annotation>TEXT ANNOTATION</annotation>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </semantics>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+
 </body>
 </html>
index fff3bd9..72d6c67 100644 (file)
@@ -45,5 +45,7 @@
     _<math><msqrt><mi id="x5">x</mi><mo>−</mo><mi>y</mi></msqrt></math>_
     _<math><mstyle><mi id="x6">x</mi><mo>−</mo><mi>y</mi></mstyle></math>_
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing");</script>
   </body>
 </html>
index b517dd5..2c3f3a4 100644 (file)
@@ -22,5 +22,7 @@
       <mo>(</mo> <mspace height="3em" depth="3em"/> <mo>)</mo>
     </math>
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script>
   </body>
 </html>
index 487bca2..06e7542 100644 (file)
@@ -83,5 +83,7 @@
     _<math><msqrt><mi>x</mi><mo>∓</mo><mi>y</mi></msqrt></math>_
     _<math><mstyle><mi>x</mi><mo>∓</mo><mi>y</mi></mstyle></math>_
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing");</script>
   </body>
 </html>
index 4f651d1..b67b389 100644 (file)
@@ -24,5 +24,7 @@
     _<math><mo form="prefix">♭</mo></math>_
     _<math><mo form="postfix">♭</mo></math>_
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing");</script>
   </body>
 </html>
index a05bef4..503a57f 100644 (file)
@@ -18,5 +18,7 @@
         <mi>x</mi>
       </munder>
     </math>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_munderover");</script>
   </body>
 </html>
index 53cf76c..33fe97a 100644 (file)
@@ -21,5 +21,7 @@
         <mi>x</mi>
       </munder>
     </math>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_munderover");</script>
     </body>
 </html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow-expected.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow-expected.html
new file mode 100644 (file)
index 0000000..3efeaa0
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>&lt;mo&gt; movablelimits</title>
+    <style>
+      math, math * {
+          font: 25px/1 Ahem;
+      }
+    </style>
+    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+  </head>
+  <body>
+    <math>
+      <msub>
+        <mo lspace="0px" rspace="0px">+</mo>
+        <mn>1</mn>
+      </msub>
+      <msup>
+        <mo lspace="0px" rspace="0px">+</mo>
+        <mn>1</mn>
+      </msup>
+      <msubsup>
+        <mo lspace="0px" rspace="0px">+</mo>
+        <mn>1</mn>
+        <mn>2</mn>
+      </msubsup>
+    </math>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html
new file mode 100644 (file)
index 0000000..b4f0326
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>&lt;mo&gt; movablelimits</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
+    <meta name="assert" content="Verify movablelimits is read from the first in-flow child.">
+    <style>
+      math, math * {
+          font: 25px/1 Ahem;
+      }
+      .oof1 {
+          position: absolute;
+      }
+      .oof2 {
+          position: fixed;
+      }
+      .nobox {
+          display: none;
+      }
+    </style>
+    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+    <link rel="match" href="mo-movablelimits-from-in-flow-ref.html">
+  </head>
+  <body>
+    <math>
+      <munder>
+        <mo class="oof1" movablelimits="false"></mo>
+        <mo class="oof2" movablelimits="false"></mo>
+        <mo class="nobox" movablelimits="false"></mo>
+        <mo lspace="0px" rspace="0px" movablelimits="true">+</mo>
+        <mn>1</mn>
+      </munder>
+      <mover>
+        <mo class="oof1" movablelimits="false"></mo>
+        <mo class="oof2" movablelimits="false"></mo>
+        <mo class="nobox" movablelimits="false"></mo>
+        <mo lspace="0px" rspace="0px" movablelimits="true">+</mo>
+        <mn>1</mn>
+      </mover>
+      <munderover>
+        <mo class="oof1" movablelimits="false"></mo>
+        <mo class="oof2" movablelimits="false"></mo>
+        <mo class="nobox" movablelimits="false"></mo>
+        <mo lspace="0px" rspace="0px" movablelimits="true">+</mo>
+        <mn>1</mn>
+        <mn>2</mn>
+      </munderover>
+    </math>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_munderover");</script>
+  </body>
+</html>
index ebb5cde..82709e4 100644 (file)
@@ -28,5 +28,7 @@
         <mi>B</mi>
       </munder>
     </math>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_munderover");</script>
   </body>
 </html>
index 8fb095b..0c387f5 100644 (file)
@@ -65,5 +65,7 @@
       <mo lspace="200px" rspace="100px">→</mo>
       <mspace width="100px" height="10px" depth="10px" style="background: black"></mspace>
     </math>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing");</script>
   </body>
 </html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001-expected.txt
new file mode 100644 (file)
index 0000000..16a9a4e
--- /dev/null
@@ -0,0 +1,162 @@
+
+PASS Operator dictionary chunk 1 - lspace/rspace 
+PASS Operator dictionary chunk 1 - movablelimits 
+PASS Operator dictionary chunk 1 - largeop 
+PASS Operator dictionary chunk 1 - stretchy 
+PASS Operator dictionary chunk 1 - symmetric 
+FAIL Operator dictionary chunk 1 - accent assert_approx_equals: Accent property for " postfix should be 'true' expected 22.421875 +/- 1 but got 7.5
+PASS Operator dictionary chunk 2 - lspace/rspace 
+PASS Operator dictionary chunk 2 - movablelimits 
+PASS Operator dictionary chunk 2 - largeop 
+PASS Operator dictionary chunk 2 - stretchy 
+PASS Operator dictionary chunk 2 - symmetric 
+FAIL Operator dictionary chunk 2 - accent assert_approx_equals: Accent property for ª postfix should be 'true' expected 22.421875 +/- 1 but got 7.5
+PASS Operator dictionary chunk 3 - lspace/rspace 
+PASS Operator dictionary chunk 3 - movablelimits 
+PASS Operator dictionary chunk 3 - largeop 
+PASS Operator dictionary chunk 3 - stretchy 
+PASS Operator dictionary chunk 3 - symmetric 
+FAIL Operator dictionary chunk 3 - accent assert_approx_equals: Accent property for ‛ postfix should be 'true' expected 22.421875 +/- 1 but got 7.5
+PASS Operator dictionary chunk 4 - lspace/rspace 
+PASS Operator dictionary chunk 4 - movablelimits 
+PASS Operator dictionary chunk 4 - largeop 
+PASS Operator dictionary chunk 4 - stretchy 
+PASS Operator dictionary chunk 4 - symmetric 
+PASS Operator dictionary chunk 4 - accent 
+PASS Operator dictionary chunk 5 - lspace/rspace 
+PASS Operator dictionary chunk 5 - movablelimits 
+PASS Operator dictionary chunk 5 - largeop 
+PASS Operator dictionary chunk 5 - stretchy 
+PASS Operator dictionary chunk 5 - symmetric 
+PASS Operator dictionary chunk 5 - accent 
+PASS Operator dictionary chunk 6 - lspace/rspace 
+PASS Operator dictionary chunk 6 - movablelimits 
+PASS Operator dictionary chunk 6 - largeop 
+PASS Operator dictionary chunk 6 - stretchy 
+PASS Operator dictionary chunk 6 - symmetric 
+PASS Operator dictionary chunk 6 - accent 
+PASS Operator dictionary chunk 7 - lspace/rspace 
+PASS Operator dictionary chunk 7 - movablelimits 
+PASS Operator dictionary chunk 7 - largeop 
+PASS Operator dictionary chunk 7 - stretchy 
+PASS Operator dictionary chunk 7 - symmetric 
+PASS Operator dictionary chunk 7 - accent 
+PASS Operator dictionary chunk 8 - lspace/rspace 
+PASS Operator dictionary chunk 8 - movablelimits 
+PASS Operator dictionary chunk 8 - largeop 
+PASS Operator dictionary chunk 8 - stretchy 
+PASS Operator dictionary chunk 8 - symmetric 
+PASS Operator dictionary chunk 8 - accent 
+PASS Operator dictionary chunk 9 - lspace/rspace 
+PASS Operator dictionary chunk 9 - movablelimits 
+PASS Operator dictionary chunk 9 - largeop 
+PASS Operator dictionary chunk 9 - stretchy 
+PASS Operator dictionary chunk 9 - symmetric 
+PASS Operator dictionary chunk 9 - accent 
+PASS Operator dictionary chunk 10 - lspace/rspace 
+PASS Operator dictionary chunk 10 - movablelimits 
+PASS Operator dictionary chunk 10 - largeop 
+PASS Operator dictionary chunk 10 - stretchy 
+PASS Operator dictionary chunk 10 - symmetric 
+PASS Operator dictionary chunk 10 - accent 
+PASS Operator dictionary chunk 11 - lspace/rspace 
+PASS Operator dictionary chunk 11 - movablelimits 
+PASS Operator dictionary chunk 11 - largeop 
+FAIL Operator dictionary chunk 11 - stretchy assert_approx_equals: Stretchy property for 〈 prefix should be 'true' expected 0 +/- 1 but got 45
+PASS Operator dictionary chunk 11 - symmetric 
+PASS Operator dictionary chunk 11 - accent 
+PASS Operator dictionary chunk 12 - lspace/rspace 
+PASS Operator dictionary chunk 12 - movablelimits 
+PASS Operator dictionary chunk 12 - largeop 
+PASS Operator dictionary chunk 12 - stretchy 
+PASS Operator dictionary chunk 12 - symmetric 
+PASS Operator dictionary chunk 12 - accent 
+PASS Operator dictionary chunk 13 - lspace/rspace 
+PASS Operator dictionary chunk 13 - movablelimits 
+PASS Operator dictionary chunk 13 - largeop 
+PASS Operator dictionary chunk 13 - stretchy 
+PASS Operator dictionary chunk 13 - symmetric 
+PASS Operator dictionary chunk 13 - accent 
+PASS Operator dictionary chunk 14 - lspace/rspace 
+PASS Operator dictionary chunk 14 - movablelimits 
+PASS Operator dictionary chunk 14 - largeop 
+PASS Operator dictionary chunk 14 - stretchy 
+PASS Operator dictionary chunk 14 - symmetric 
+PASS Operator dictionary chunk 14 - accent 
+PASS Operator dictionary chunk 15 - lspace/rspace 
+PASS Operator dictionary chunk 15 - movablelimits 
+PASS Operator dictionary chunk 15 - largeop 
+PASS Operator dictionary chunk 15 - stretchy 
+PASS Operator dictionary chunk 15 - symmetric 
+PASS Operator dictionary chunk 15 - accent 
+PASS Operator dictionary chunk 16 - lspace/rspace 
+PASS Operator dictionary chunk 16 - movablelimits 
+PASS Operator dictionary chunk 16 - largeop 
+PASS Operator dictionary chunk 16 - stretchy 
+PASS Operator dictionary chunk 16 - symmetric 
+PASS Operator dictionary chunk 16 - accent 
+PASS Operator dictionary chunk 17 - lspace/rspace 
+PASS Operator dictionary chunk 17 - movablelimits 
+PASS Operator dictionary chunk 17 - largeop 
+PASS Operator dictionary chunk 17 - stretchy 
+PASS Operator dictionary chunk 17 - symmetric 
+PASS Operator dictionary chunk 17 - accent 
+PASS Operator dictionary chunk 18 - lspace/rspace 
+PASS Operator dictionary chunk 18 - movablelimits 
+PASS Operator dictionary chunk 18 - largeop 
+PASS Operator dictionary chunk 18 - stretchy 
+PASS Operator dictionary chunk 18 - symmetric 
+PASS Operator dictionary chunk 18 - accent 
+PASS Operator dictionary chunk 19 - lspace/rspace 
+PASS Operator dictionary chunk 19 - movablelimits 
+PASS Operator dictionary chunk 19 - largeop 
+PASS Operator dictionary chunk 19 - stretchy 
+PASS Operator dictionary chunk 19 - symmetric 
+PASS Operator dictionary chunk 19 - accent 
+PASS Operator dictionary chunk 20 - lspace/rspace 
+PASS Operator dictionary chunk 20 - movablelimits 
+PASS Operator dictionary chunk 20 - largeop 
+PASS Operator dictionary chunk 20 - stretchy 
+PASS Operator dictionary chunk 20 - symmetric 
+PASS Operator dictionary chunk 20 - accent 
+PASS Operator dictionary chunk 21 - lspace/rspace 
+PASS Operator dictionary chunk 21 - movablelimits 
+PASS Operator dictionary chunk 21 - largeop 
+PASS Operator dictionary chunk 21 - stretchy 
+PASS Operator dictionary chunk 21 - symmetric 
+PASS Operator dictionary chunk 21 - accent 
+PASS Operator dictionary chunk 22 - lspace/rspace 
+PASS Operator dictionary chunk 22 - movablelimits 
+PASS Operator dictionary chunk 22 - largeop 
+PASS Operator dictionary chunk 22 - stretchy 
+PASS Operator dictionary chunk 22 - symmetric 
+PASS Operator dictionary chunk 22 - accent 
+PASS Operator dictionary chunk 23 - lspace/rspace 
+PASS Operator dictionary chunk 23 - movablelimits 
+PASS Operator dictionary chunk 23 - largeop 
+PASS Operator dictionary chunk 23 - stretchy 
+PASS Operator dictionary chunk 23 - symmetric 
+PASS Operator dictionary chunk 23 - accent 
+accent for """ (postfix): 
+"
+ VS 
+"
+accent for "ª" (postfix): 
+ VS 
+accent for "‛" (postfix): 
+‛
+ VS 
+‛
+stretchy for "〈" (prefix): 
+〈
+ VS 
+〈
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html
new file mode 100644 (file)
index 0000000..ea3d5ae
--- /dev/null
@@ -0,0 +1,283 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Operator dictionary</title>
+<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/#dictionary-based-attributes">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
+<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
+<meta name="timeout" content="long">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/operator-dictionary.js"></script>
+<style>
+  @font-face {
+    font-family: operators;
+    src: url("/fonts/math/operators.woff");
+  }
+  math, math * {
+      font-family: operators;
+      /* Use large enough font-size so that 1/18em = 2.77px > epsilon and
+         one can really distinguish lspace/rspace values. */
+      font-size: 50px;
+  }
+</style>
+<script>
+  setup({ explicit_done: true });
+  window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
+
+  async function runTests() {
+      let epsilon = 1;
+      let json = await fetchOperatorDictionary();
+
+      // The operator dictionary has more than one thousand of entries so the
+      // tests are grouped in chunks so that these don't get much more
+      // importance than other MathML tests. For easy debugging, one can set the
+      // chunk size to 1. Also, note that the test div will remain visible for
+      // failed tests.
+      const entryPerChunk = 50
+
+      var counter = 0;
+      var tests = {
+          "lspace/rspace": null,
+          "movablelimits": null,
+          "largeop": null,
+          "stretchy": null,
+          "symmetric": null,
+          "accent": null
+      };
+
+      for (key in json.dictionary) {
+
+          if (counter % entryPerChunk === 0) {
+              // Start of a new chunk.
+              // Complete current async tests and create new ones for the next chunk.
+              for (name in tests) {
+                  if (tests[name]) tests[name].done();
+                  tests[name] = async_test(`Operator dictionary chunk ${1 + counter / entryPerChunk} - ${name}`);
+              }
+          }
+
+          let parsedKey = splitKey(key);
+          let entry = json.dictionary[key];
+
+          tests["lspace/rspace"].step(function() {
+              assert_true(MathMLFeatureDetection.has_operator_spacing());
+              document.body.insertAdjacentHTML("beforeend", `<div>\
+lspace/rspace for "${parsedKey.characters}" (${parsedKey.form}): \
+<math>\
+  <mrow>\
+    <mn>&nbsp;</mn>\
+    <mo form="${parsedKey.form}">${parsedKey.characters}</mo>\
+    <mn>&nbsp;</mn>\
+  </mrow>\
+</math>\
+ VS \
+<math>\
+  <mrow>\
+    <mn>&nbsp;</mn>\
+    <mo form="${parsedKey.form}" lspace="${defaultPropertyValue(entry, 'lspace')}" rspace="${defaultPropertyValue(entry, 'rspace')}">${parsedKey.characters}</mo>\
+    <mn>&nbsp;</mn>\
+  </mrow>\
+</math>\
+</div>`);
+              var div = document.body.lastElementChild;
+              var mrows = div.getElementsByTagName("mrow");
+              function spaceBetween(element, i, j) {
+                  return element.children[j].getBoundingClientRect().left -
+                      element.children[i].getBoundingClientRect().right;
+              }
+              var lspace = spaceBetween(mrows[0], 0, 1);
+              var rspace = spaceBetween(mrows[0], 1, 2);
+              var lspaceRef = spaceBetween(mrows[1], 0, 1);
+              var rspaceRef = spaceBetween(mrows[1], 1, 2);
+              assert_approx_equals(lspace, lspaceRef, epsilon, `lspace (${key})`);
+              assert_approx_equals(rspace, rspaceRef, epsilon, `rspace (${key})`);
+              div.style.display = "none";
+          });
+
+          tests["movablelimits"].step(function() {
+              assert_true(MathMLFeatureDetection.has_movablelimits());
+              var defaultValue = defaultPropertyValue(entry, "movablelimits");
+              document.body.insertAdjacentHTML("beforeend", `<div>\
+movablelimits for "${parsedKey.characters}" (${parsedKey.form}): \
+<math>\
+  <munder>\
+    <mo stretchy="false" form="${parsedKey.form}">${parsedKey.characters}</mo>\
+    <mn>&nbsp;</mn>\
+  </munder>\
+</math>\
+ VS \
+<math>\
+  <munder>\
+    <mo stretchy="false" form="${parsedKey.form}" movablelimits="${defaultValue}">${parsedKey.characters}</mo>\
+    <mn>&nbsp;</mn>\
+  </munder>\
+</math>\
+</div>`);
+              var div = document.body.lastElementChild;
+              var munders = div.getElementsByTagName("munder");
+              munder = munders[0].getBoundingClientRect()
+              munderRef = munders[1].getBoundingClientRect()
+              assert_approx_equals(munder.height, munderRef.height, epsilon, `Movablelimits property for ${key} should be '${defaultValue}'`);
+              div.style.display = "none";
+          });
+
+          tests["largeop"].step(function() {
+              // FIXME: Should really detect largeop support...
+              assert_true(MathMLFeatureDetection.has_mspace());
+              var defaultValue = defaultPropertyValue(entry, "largeop");
+              document.body.insertAdjacentHTML("beforeend", `<div>\
+largeop for "${parsedKey.characters}" (${parsedKey.form}): \
+<math displaystyle="true">\
+  <mo form="${parsedKey.form}">${parsedKey.characters}</mo>\
+</math>\
+ VS \
+<math displaystyle="true">\
+  <mo form="${parsedKey.form}" largeop="${defaultValue}">${parsedKey.characters}</mo>\
+</math>\
+</div>`);
+              var div = document.body.lastElementChild;
+              var mos = div.getElementsByTagName("mo");
+              mo = mos[0].getBoundingClientRect()
+              moRef = mos[1].getBoundingClientRect()
+              assert_approx_equals(mo.height, moRef.height, epsilon, `Largeop property for ${key} should be '${defaultValue}'`);
+              div.style.display = "none";
+          });
+
+          if (entry.horizontal) {
+              tests["stretchy"].step(function() {
+                  // FIXME: Should really detect stretchy support...
+                  assert_true(MathMLFeatureDetection.has_munder());
+                  var defaultValue = defaultPropertyValue(entry, "stretchy");
+                  document.body.insertAdjacentHTML("beforeend", `<div>\
+stretchy for "${parsedKey.characters}" (${parsedKey.form}): \
+<math>\
+  <munder>\
+    <mn>&nbsp;&nbsp;</mn>\
+    <mo form="${parsedKey.form}">${parsedKey.characters}</mo>\
+  </munder>\
+</math>\
+ VS \
+<math>\
+  <munder>\
+    <mn>&nbsp;&nbsp;</mn>\
+    <mo form="${parsedKey.form}" stretchy="${defaultValue}">${parsedKey.characters}</mo>\
+  </munder>\
+</math>\
+</div>`);
+                  var div = document.body.lastElementChild;
+                  var mos = div.getElementsByTagName("mo");
+                  mo = mos[0].getBoundingClientRect()
+                  moRef = mos[1].getBoundingClientRect()
+                  assert_approx_equals(mo.width, moRef.width, epsilon, `Stretchy property for ${key} should be '${defaultValue}'`);
+                  div.style.display = "none";
+              });
+          } else {
+              tests["stretchy"].step(function() {
+                  // FIXME: Should really detect stretchy support...
+                  assert_true(MathMLFeatureDetection.has_mspace());
+                  var defaultValue = defaultPropertyValue(entry, "stretchy");
+                  document.body.insertAdjacentHTML("beforeend", `<div>\
+stretchy for "${parsedKey.characters}" (${parsedKey.form}): \
+<math>\
+  <mrow>\
+    <mo form="${parsedKey.form}" symmetric="false">${parsedKey.characters}</mo>\
+    <mspace height="2em"></mspace>\
+  </mrow>\
+</math>\
+ VS \
+<math>\
+  <mrow>\
+    <mo form="${parsedKey.form}" symmetric="false" stretchy="${defaultValue}">${parsedKey.characters}</mo>\
+    <mspace height="2em"></mspace>\
+  </mrow>\
+</math>\
+</div>`);
+                  var div = document.body.lastElementChild;
+                  var mos = div.getElementsByTagName("mo");
+                  mo = mos[0].getBoundingClientRect()
+                  moRef = mos[1].getBoundingClientRect()
+                  assert_approx_equals(mo.height, moRef.height, epsilon, `Stretchy property for ${key} should be '${defaultValue}'`);
+                  div.style.display = "none";
+              });
+              tests["symmetric"].step(function() {
+                  // FIXME: Should really detect symmetric support...
+                  assert_true(MathMLFeatureDetection.has_mspace());
+                  var defaultValue = defaultPropertyValue(entry, "symmetric");
+                  document.body.insertAdjacentHTML("beforeend", `<div>\
+symmetric for "${parsedKey.characters}" (${parsedKey.form}): \
+<math>\
+  <mrow>\
+    <mo form="${parsedKey.form}" stretchy="true">${parsedKey.characters}</mo>\
+    <mspace height="1.5em"></mspace>\
+  </mrow>\
+</math>\
+ VS \
+<math>\
+  <mrow>\
+    <mo form="${parsedKey.form}" stretchy="true" symmetric="${defaultValue}">${parsedKey.characters}</mo>\
+    <mspace height="1.5em"></mspace>\
+  </mrow>\
+</math>\
+</div>`);
+                  var div = document.body.lastElementChild;
+                  var mos = div.getElementsByTagName("mo");
+                  mo = mos[0].getBoundingClientRect()
+                  moRef = mos[1].getBoundingClientRect()
+                  assert_approx_equals(mo.height, moRef.height, epsilon, `Symmetric property for ${key} should be '${defaultValue}'`);
+                  div.style.display = "none";
+              });
+          }
+
+          tests["accent"].step(function() {
+              // FIXME: Should really detect accent support...
+              assert_true(MathMLFeatureDetection.has_mover());
+              var defaultValue = defaultPropertyValue(entry, "accent");
+              document.body.insertAdjacentHTML("beforeend", `<div>\
+accent for "${parsedKey.characters}" (${parsedKey.form}): \
+<math>\
+  <mover>\
+    <mn>&nbsp;</mn>\
+    <mo form="${parsedKey.form}">${parsedKey.characters}</mo>\
+  </mover>\
+</math>\
+ VS \
+<math>\
+  <mover>\
+    <mn>&nbsp;</mn>\
+    <mo form="${parsedKey.form}" accent="${defaultValue}">${parsedKey.characters}</mo>\
+  </mover>\
+</math>\
+</div>`);
+              var div = document.body.lastElementChild;
+              var movers = div.getElementsByTagName("mover");
+              function gapBetweenBaseAndScript(mover) {
+                  return mover.children[0].getBoundingClientRect().top -
+                      mover.children[1].getBoundingClientRect().bottom;
+              }
+              var gap = gapBetweenBaseAndScript(movers[0])
+              var gapRef = gapBetweenBaseAndScript(movers[1])
+              assert_approx_equals(gap, gapRef, epsilon, `Accent property for ${key} should be '${defaultValue}'`);
+              div.style.display = "none";
+          });
+
+          counter++;
+      }
+
+      // Complete current async tests.
+      for (name in tests) {
+          if (tests[name]) tests[name].done();
+      }
+
+      done();
+  }
+</script>
+</head>
+<body>
+  <div id="log"></div>
+</body>
+</html>
index 366351f..b36265f 100644 (file)
@@ -30,6 +30,9 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-dynamic.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits-from-in-flow.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablelimits.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-paint-lspace-rspace-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-paint-lspace-rspace.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow-expected.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow-expected.html
new file mode 100644 (file)
index 0000000..e1b8c3d
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>radicals rendering from in-flow children</title>
+  </head>
+  <body>
+    <math>
+      <msqrt>
+        <mspace width="64px" height="8px" style="background: lightblue"></mspace>
+      </msqrt>
+      <mroot>
+        <mspace width="64px" height="12px" style="background: lightblue"></mspace>
+        <mspace width="128px" height="24px" style="background: lightgreen"></mspace>
+      </mroot>
+    </math>
+  </body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html
new file mode 100644 (file)
index 0000000..44e449e
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>radicals rendering from in-flow children</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#radicals-msqrt-mroot">
+    <meta name="assert" content="Verify rendering of radicals is only affected by in-flow children.">
+    <style>
+      .oof1 {
+          position: absolute;
+      }
+      .oof2 {
+          position: fixed;
+      }
+      .nobox {
+          display: none;
+      }
+    </style>
+    <link rel="match" href="radical-rendering-from-in-flow-ref.html">
+  </head>
+  <body>
+    <math>
+      <msqrt>
+        <mspace width="32px" class="oof1"/>
+        <mspace width="16px" class="oof2"/>
+        <mspace width="8px" class="nobox"/>
+        <mspace width="64px" height="8px" style="background: lightblue"></mspace>
+        <mspace width="32px" class="oof1"/>
+        <mspace width="16px" class="oof2"/>
+        <mspace width="8px" class="nobox"/>
+      </msqrt>
+      <mroot>
+        <mspace width="32px" class="oof1"/>
+        <mspace width="16px" class="oof2"/>
+        <mspace width="8px" class="nobox"/>
+        <mspace width="64px" height="12px" style="background: lightblue"></mspace>
+        <mspace width="32px" class="oof1"/>
+        <mspace width="16px" class="oof2"/>
+        <mspace width="8px" class="nobox"/>
+        <mspace width="128px" height="24px" style="background: lightgreen"></mspace>
+        <mspace width="32px" class="oof1"/>
+        <mspace width="16px" class="oof2"/>
+        <mspace width="8px" class="nobox"/>
+      </mroot>
+    </math>
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_msqrt");</script>
+  </body>
+</html>
index 8f53baf..8627097 100644 (file)
@@ -14,4 +14,6 @@ Property values requiring vendor prefixes:
 None
 ------------------------------------------------------------------------
 List of files:
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/radical-rendering-from-in-flow.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001-expected.txt
new file mode 100644 (file)
index 0000000..01b0b32
--- /dev/null
@@ -0,0 +1,380 @@
+
+PASS child of non-cramped element 
+FAIL child of cramped element assert_greater_than: mrow-002 should be cramped expected a number greater than 25 but got 20
+FAIL child of msqrt assert_greater_than: msqrt-001 should be cramped expected a number greater than 25 but got 20
+FAIL child of parent assert_greater_than: mroot-001 should be cramped expected a number greater than 25 but got 20
+FAIL child of mfrac assert_greater_than: denominator should be cramped expected a number greater than 25 but got 20
+FAIL child of msub assert_greater_than: subscript should be cramped expected a number greater than 25 but got 20
+PASS child of msup 
+FAIL child of msubsup assert_greater_than: subscript should be cramped expected a number greater than 25 but got 20
+FAIL child of munder assert_greater_than: underscript should be cramped expected a number greater than 25 but got 20
+PASS child of mover 
+FAIL child of munderover assert_greater_than: underscript should be cramped expected a number greater than 25 but got 20
+FAIL accent child of mover assert_greater_than: accent overscript should be cramped expected a number greater than 25 but got 20
+FAIL accent child of munderover assert_greater_than: accent overscript should be cramped expected a number greater than 25 but got 20
+PASS child of non-cramped element, from in-flow children 
+FAIL child of cramped element, from in-flow children assert_greater_than: mrow-012 should be cramped expected a number greater than 25 but got 10
+FAIL child of msqrt, from in-flow children assert_greater_than: msqrt-011 should be cramped expected a number greater than 25 but got 10
+FAIL child of parent, from in-flow children assert_greater_than: mroot-011 should be cramped expected a number greater than 25 but got 10
+FAIL child of mfrac, from in-flow children assert_greater_than: denominator should be cramped expected a number greater than 25 but got 10
+FAIL child of msub, from in-flow children assert_greater_than: subscript should be cramped expected a number greater than 25 but got 10
+PASS child of msup, from in-flow children 
+FAIL child of msubsup, from in-flow children assert_greater_than: subscript should be cramped expected a number greater than 25 but got 10
+FAIL child of munder, from in-flow children assert_greater_than: underscript should be cramped expected a number greater than 25 but got 10
+PASS child of mover, from in-flow children 
+FAIL child of munderover, from in-flow children assert_greater_than: underscript should be cramped expected a number greater than 25 but got 12
+FAIL accent child of mover, from in-flow children assert_greater_than: accent overscript should be cramped expected a number greater than 25 but got 12
+FAIL accent child of munderover, from in-flow children assert_greater_than: accent overscript should be cramped expected a number greater than 25 but got 12
+
+
+0
+1
+3
+4
+
+0
+
+1
+
+1
+
+0
+
+1
+
+0
+
+1
+
+0
+
+1
+2
+
+0
+2
+
+0
+1
+
+1
+
+0
+
+1
+
+0
+
+0
+
+0
+
+1
+2
+
+0
+2
+
+0
+1
+
+0
+1
+
+0
+1
+
+01
+01
+01
+01
+01 01
+01
+01
+01
+01
+01
+01
+
+01
+0101
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+01
+
+01
+01
+0
+01
+1
+01
+01
+01
+01
+01
+3
+01
+4
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+2
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+2
+01
+01
+
+01
+01
+0
+01
+1
+01
+01
+01
+01
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+01
+
+01
+01
+01
+01
+01
+01
+1
+01
+2
+01
+01
+
+01
+01
+0
+01
+01
+01
+01
+01
+2
+01
+01
+
+01
+01
+0
+01
+1
+01
+01
+01
+01
+01
+01
+
+01
+01
+0
+01
+1
+01
+01
+01
+01
+01
+01
+
+01
+01
+0
+01
+1
+01
+01
+01
+01
+01
+01
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html
new file mode 100644 (file)
index 0000000..d0e636c
--- /dev/null
@@ -0,0 +1,1094 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Cramped elements</title>
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#cramped-elements">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#subscripts-and-superscripts-msub-msup-msubsup">
+<meta name="assert" content="Verify definition of cramped elements.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/box-navigation.js"></script>
+<style>
+  math {
+      font-family: superscriptshiftupcramped5000;
+  }
+  math, math * {
+      font-size: 10px;
+      background: lightyellow;
+  }
+  @font-face {
+    font-family: superscriptshiftupcramped5000;
+    src: url("/fonts/math/scripts-superscriptshiftupcramped5000.woff");
+  }
+  .testedElement *:first-child {
+      background: lightblue;
+  }
+  .testedElement *:last-child {
+      background: pink;
+  }
+  .oof1 {
+      position: absolute;
+  }
+  .oof2 {
+      position: fixed;
+  }
+  .nobox {
+      display: none;
+  }
+</style>
+<script>
+  function assert_cramped(id, expected, name) {
+      const emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
+      const superscriptshiftupcramped = 5000 * emToPx;
+      var container = document.getElementById(id);
+      var msup = container.getElementsByClassName("testedElement")[0];
+      var base = firstInFlowChild(msup);
+      var script = nextInFlowSibling(base);
+      var shift = base.getBoundingClientRect().bottom - script.getBoundingClientRect().bottom;
+      if (expected)
+          assert_greater_than(shift, superscriptshiftupcramped / 2, `${name || id} should be cramped`);
+      else
+          assert_less_than(shift, superscriptshiftupcramped / 2, `${name || id} should not be cramped`);
+  }
+
+  setup({ explicit_done: true });
+  window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
+
+  function runTests() {
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("math-001", false);
+          assert_cramped("mrow-001", false, "mrow");
+      }, "child of non-cramped element");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mrow-002", true);
+      }, "child of cramped element");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msqrt-001", true);
+      }, "child of msqrt");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mroot-001", true);
+      }, "child of parent");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mfrac-001", false, "numerator");
+          assert_cramped("mfrac-002", true, "denominator");
+      }, "child of mfrac");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msub-001", false, "base");
+          assert_cramped("msub-002", true, "subscript");
+      }, "child of msub");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msup-001", false, "base");
+          assert_cramped("msup-002", false, "superscript");
+      }, "child of msup");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msubsup-001", false, "base");
+          assert_cramped("msubsup-002", true, "subscript");
+          assert_cramped("msubsup-003", false, "superscript");
+      }, "child of msubsup");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("munder-001", false, "base");
+          assert_cramped("munder-002", true, "underscript");
+      }, "child of munder");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mover-001", false, "base");
+          assert_cramped("mover-002", false, "non-accent overscript");
+      }, "child of mover");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("munderover-001", false, "base");
+          assert_cramped("munderover-002", true, "underscript");
+          assert_cramped("munderover-003", false, "non-accent overscript");
+      }, "child of munderover");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mover-003", true, "accent overscript");
+          assert_cramped("mover-004", false, "accent superscript");
+      }, "accent child of mover");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("munderover-004", true, "accent overscript");
+          assert_cramped("munderover-005", false, "accent superscript");
+      }, "accent child of munderover");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("math-011", false);
+          assert_cramped("mrow-011", false, "mrow");
+      }, "child of non-cramped element, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mrow-012", true);
+      }, "child of cramped element, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msqrt-011", true);
+      }, "child of msqrt, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mroot-011", true);
+      }, "child of parent, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mfrac-011", false, "numerator");
+          assert_cramped("mfrac-012", true, "denominator");
+      }, "child of mfrac, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msub-011", false, "base");
+          assert_cramped("msub-012", true, "subscript");
+      }, "child of msub, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msup-011", false, "base");
+          assert_cramped("msup-012", false, "superscript");
+      }, "child of msup, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("msubsup-011", false, "base");
+          assert_cramped("msubsup-012", true, "subscript");
+          assert_cramped("msubsup-013", false, "superscript");
+      }, "child of msubsup, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("munder-011", false, "base");
+          assert_cramped("munder-012", true, "underscript");
+      }, "child of munder, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mover-011", false, "base");
+          assert_cramped("mover-012", false, "non-accent overscript");
+      }, "child of mover, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("munderover-011", false, "base");
+          assert_cramped("munderover-012", true, "underscript");
+          assert_cramped("munderover-013", false, "non-accent overscript");
+      }, "child of munderover, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("mover-013", true, "accent overscript");
+          assert_cramped("mover-014", false, "accent superscript");
+      }, "accent child of mover, from in-flow children");
+
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          assert_cramped("munderover-014", true, "accent overscript");
+          assert_cramped("munderover-015", false, "accent superscript");
+      }, "accent child of munderover, from in-flow children");
+
+      done();
+  }
+</script>
+</head>
+<body>
+  <div id="log"></div>
+  <p>
+    <math id="math-001">
+      <msup class="testedElement">
+        <mspace height="2em" width="2em"/>
+        <mspace height="1em" width="1em"/>
+      </msup>
+    </math>
+    <math>
+      <mrow id="mrow-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </mrow>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msqrt>
+        <!-- This is a child of a msqrt so it is cramped. As a consequence,
+             all its descendants are cramped too. -->
+        <munderover>
+          <mover>
+            <munder>
+              <msubsup>
+                <msup>
+                  <msub>
+                    <mfrac>
+                      <mrow id="mrow-002">
+                        <msup class="testedElement">
+                          <mspace height="2em" width="2em"/>
+                          <mspace height="1em" width="1em"/>
+                        </msup>
+                      </mrow>
+                      <mspace/>
+                    </mfrac>
+                    <mspace/>
+                  </msub>
+                  <mspace/>
+                </msup>
+                <mspace/>
+                <mspace/>
+              </msubsup>
+              <mspace/>
+            </munder>
+            <mspace/>
+          </mover>
+          <mspace/>
+          <mspace/>
+        </munderover>
+      </msqrt>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msqrt id="msqrt-001">
+        <mn>0</mn>
+        <mn>1</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>3</mn>
+        <mn>4</mn>
+      </msqrt>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mroot id="mroot-001">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </mroot>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mroot id="mroot-002">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+      </mroot>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mfrac id="mfrac-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+      </mfrac>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mfrac id="mfrac-002">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </mfrac>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msub id="msub-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+      </msub>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msub id="msub-002">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </msub>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msup id="msup-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+      </msup>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msup id="msup-002">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </msup>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msubsup id="msubsup-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+        <mn>2</mn>
+      </msubsup>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msubsup id="msubsup-002">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>2</mn>
+      </msubsup>
+    </math>
+  </p>
+  <p>
+    <math>
+      <msubsup id="msubsup-003">
+        <mn>0</mn>
+        <mn>1</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </msubsup>
+    </math>
+  </p>
+  <p>
+    <math>
+      <munder id="munder-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+      </munder>
+    </math>
+  </p>
+  <p>
+    <math>
+      <munder id="munder-002">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </munder>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mover id="mover-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+      </mover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mover id="mover-002">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </mover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mover accent="true" id="mover-003">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </mover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mover accent="true" id="mover-004">
+        <mo movablelimits="true">0</mo>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </mover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <munderover id="munderover-001">
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>1</mn>
+        <mn>2</mn>
+      </munderover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <munderover id="munderover-002">
+        <mn>0</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+        <mn>2</mn>
+      </munderover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <munderover id="munderover-003">
+        <mn>0</mn>
+        <mn>1</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </munderover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <munderover accent="true" id="munderover-004">
+        <mn>0</mn>
+        <mn>1</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </munderover>
+    </math>
+  </p>
+  <p>
+    <math>
+      <munderover accent="true" id="munderover-005">
+        <mo movablelimits="true">0</mo>
+        <mn>1</mn>
+        <msup class="testedElement">
+          <mspace height="2em" width="2em"/>
+          <mspace height="1em" width="1em"/>
+        </msup>
+      </munderover>
+    </math>
+  </p>
+
+  <p>
+    <math id="math-011">
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msup class="testedElement">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mspace height="2em" width="2em"/>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mspace height="1em" width="1em"/>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mrow id="mrow-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mrow>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msqrt>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <!-- This is a child of a msqrt so it is cramped. As a consequence,
+             all its descendants are cramped too. -->
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <munderover>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mover>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <munder>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <msubsup>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <msup>
+                  <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                  <msub>
+                    <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                    <mfrac>
+                      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                      <mrow id="mrow-012">
+                        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                        <msup class="testedElement">
+                          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                          <mspace height="2em" width="2em"/>
+                          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                          <mspace height="1em" width="1em"/>
+                          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                        </msup>
+                        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                      </mrow>
+                      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                      <mspace/>
+                      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                    </mfrac>
+                    <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                    <mspace/>
+                    <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                  </msub>
+                  <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                  <mspace/>
+                  <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                </msup>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace/>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace/>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </msubsup>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace/>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            </munder>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mspace/>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          </mover>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </munderover>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msqrt>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msqrt id="msqrt-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>3</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>4</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msqrt>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mroot id="mroot-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mroot>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mroot id="mroot-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mroot>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mfrac id="mfrac-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mfrac>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mfrac id="mfrac-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mfrac>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msub id="msub-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msub>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msub id="msub-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msub>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msup id="msup-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msup id="msup-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msubsup id="msubsup-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>2</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msubsup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msubsup id="msubsup-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>2</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msubsup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <msubsup id="msubsup-013">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </msubsup>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munder id="munder-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munder>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munder id="munder-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munder>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mover id="mover-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mover id="mover-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mover accent="true" id="mover-013">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mover accent="true" id="mover-014">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo movablelimits="true">0</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munderover id="munderover-011">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>2</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munderover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munderover id="munderover-012">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>2</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munderover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munderover id="munderover-013">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munderover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munderover accent="true" id="munderover-014">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>0</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munderover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <munderover accent="true" id="munderover-015">
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo movablelimits="true">0</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mn>1</mn>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <msup class="testedElement">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="2em" width="2em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace height="1em" width="1em"/>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </msup>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </munderover>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+</body>
+</html>
index 775b3c9..5ce8aaf 100644 (file)
@@ -14,6 +14,7 @@ Property values requiring vendor prefixes:
 None
 ------------------------------------------------------------------------
 List of files:
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/subsup-1.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/subsup-2.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/subsup-3.html
index 18668bd..e5c9ab9 100644 (file)
@@ -1,6 +1,8 @@
 
 FAIL complex space-like subtree assert_approx_equals: expected 25 +/- 1 but got 0
+FAIL complex space-like subtree, from in-flow children assert_approx_equals: expected 25 +/- 1 but got 0
 PASS complex non-space-like subtree 
+PASS complex non-space-like subtree, from in-flow children 
 X
 X
 X
@@ -20,22 +22,149 @@ X
 X
 X
 
+01
 X
+01
+01
 X
+01
+01
+01
 X
+01
 X
+01
+01
 X
+01
+01
+01
 X
+01
+01
 X
+01
+01
+01
+01
 X
+01
 X
+01
+01
+01
+01
+01
 X
+01
+01
+01
+01
 X
+01
 X
+01
+01
 X
+01
 X
+01
+01
+01
 X
+01
 X
+01
+01
+01
+01
+01
+01
 X
+01
+01
 X
+01
 
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+X
+
+01
+X
+01
+01
+X
+01
+01
+01
+X
+01
+X
+01
+01
+X
+01
+01
+01
+X
+01
+01
+X
+01
+01
+01
+01
+X
+01
+X
+01
+01
+01
+01
+01
+X
+01
+01
+01
+01
+X
+01
+X
+01
+01
+X
+01
+X
+01
+01
+01
+X
+01
+X
+01
+01
+01
+01
+01
+01
+X
+01
+01
+X
+01
index 091a3ea..2ad6b0b 100644 (file)
@@ -11,6 +11,7 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/box-navigation.js"></script>
 <style>
   /* Default spacing of operator 'X' is 0.2777777777777778em so quite different
      from the measured/specified 0em and 1em. */
       color: blue !important;
       background: blue !important;
   }
+  .oof1 {
+      position: absolute;
+  }
+  .oof2 {
+      position: fixed;
+  }
+  .nobox {
+      display: none;
+  }
 </style>
 <script>
   function spaceBefore(id) {
       var element = document.getElementById(id);
-      var mnBeforeParent = element.parentNode.previousElementSibling;
+      var mnBeforeParent = previousInFlowSibling(element.parentNode);
       return element.getBoundingClientRect().left - mnBeforeParent.getBoundingClientRect().right;
   }
 
   function spaceAfter(id) {
       var element = document.getElementById(id);
-      var mnAfterParent = element.parentNode.nextElementSibling;
+      var mnAfterParent = nextInFlowSibling(element.parentNode);
       return mnAfterParent.getBoundingClientRect().left - element.getBoundingClientRect().right;
   }
 
 
       test(function() {
           assert_true(MathMLFeatureDetection.has_operator_spacing());
+          assert_approx_equals(spaceBefore("complex1-bis"), emToPx, epsilon);
+          assert_approx_equals(spaceAfter("complex1-bis"), emToPx, epsilon);
+      }, "complex space-like subtree, from in-flow children");
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_operator_spacing());
           assert_approx_equals(spaceBefore("complex2"), 0, epsilon);
           assert_approx_equals(spaceAfter("complex2"), 2 * emToPx, epsilon);
       }, "complex non-space-like subtree");
 
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_operator_spacing());
+          assert_approx_equals(spaceBefore("complex2-bis"), 0, epsilon);
+          assert_approx_equals(spaceAfter("complex2-bis"), 2 * emToPx, epsilon);
+      }, "complex non-space-like subtree, from in-flow children");
+
       done();
   }
 </script>
   </p>
   <p>
     <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mrow>
+        <!-- This element is space-like because it is made of nested
+             mrow, mstyle, mpadded, mphantom, mtext, mspace
+          -->
+        <mrow class="testedElement" id="complex1-bis">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mtext>X</mtext>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mstyle>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mstyle>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            </mstyle>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mtext>X</mtext>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mspace width="25px"></mspace>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mpadded>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mrow></mrow>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mphantom>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace width="25px"></mspace>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mphantom>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mrow>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mrow>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            </mpadded>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mspace width="25px"></mspace>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mtext>X</mtext>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mspace width="25px"></mspace>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mpadded>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mphantom>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace width="25px"></mspace>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mphantom>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mphantom>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace width="25px"></mspace>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mphantom>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            </mpadded>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          </mstyle>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace width="25px"></mspace>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </mrow>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="1em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mrow>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
+  <p>
+    <math>
       <mn>X</mn>
       <mrow>
         <!-- This element is not space-like. It is made of nested
       <mn>X</mn>
     </math>
   </p>
+  <p>
+    <math>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mrow>
+        <!-- This element is not space-like. It is made of nested
+             mrow, mstyle, mpadded, mphantom, mtext, mspace but contains
+             one non-space like descendant (an mn element).
+          -->
+        <mrow class="testedElement" id="complex2-bis">
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mtext>X</mtext>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mstyle>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mstyle>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            </mstyle>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mtext>X</mtext>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mspace width="25px"></mspace>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mpadded>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mrow></mrow>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mphantom>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace width="25px"></mspace>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mphantom>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mrow>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mrow>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            </mpadded>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mspace width="25px"></mspace>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mtext>X</mtext>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mspace width="25px"></mspace>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            <mpadded>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mphantom>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mn>X</mn> <!-- mn is not space-like -->
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace width="25px"></mspace>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mphantom>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mphantom>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mtext>X</mtext>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+                <mspace width="25px"></mspace>
+                <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              </mphantom>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mtext>X</mtext>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+              <mspace width="25px"></mspace>
+              <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+            </mpadded>
+            <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          </mstyle>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+          <mspace width="25px"></mspace>
+          <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        </mrow>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+        <mo lspace="1em" rspace="0em">X</mo>
+        <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      </mrow>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+      <mn>X</mn>
+      <mn class="oof1">0</mn><mn class="oof2">1</mn><mn class="nobox">2</mn>
+    </math>
+  </p>
 </body>
 </html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001-expected.txt
new file mode 100644 (file)
index 0000000..b55e52a
--- /dev/null
@@ -0,0 +1,10 @@
+
+PASS Layout of table-001 
+PASS Layout of table-002 
+PASS Layout of table-003 
+PASS Layout of table-011 
+PASS Layout of table-012 
+PASS Layout of table-013 
+                                                                                                                                                                                
+
+                                                                                                                                                                                
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001.html
new file mode 100644 (file)
index 0000000..f967f62
--- /dev/null
@@ -0,0 +1,286 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Basic table layout</title>
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#table-or-matrix-mtable">
+<meta name="assert" content="Verify position of cells in basic 2x2, 4x3 and 3x4 math tables.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
+<script>
+  setup({ explicit_done: true });
+  window.addEventListener("load", runTests);
+  function runTests() {
+      Array.from(document.getElementsByTagName("mtable")).forEach(table => {
+          const id = table.getAttribute("id");
+          const rtl = window.getComputedStyle(table).direction === "rtl";
+          test(function() {
+              assert_true(MathMLFeatureDetection.has_mspace());
+              const rows = Array.from(table.getElementsByTagName("mtr"));
+              for (var j = 0; j < rows.length; j++) {
+                  var cells = Array.from(rows[j].getElementsByTagName("mtd"));
+                  for (var i = 0; i < cells.length - 1; i++) {
+                      var space1 = cells[i].firstElementChild.getBoundingClientRect();
+                      var space2 = cells[i + 1].firstElementChild.getBoundingClientRect();
+                      assert_equals(space1.top, space2.top,
+                                    `Cells (${i},${j}) and (${i + 1},${j}) should have same vertical position`);
+                      if (rtl) {
+                          assert_greater_than(space1.left, space2.right,
+                                              `Cell (${i},${j}) should be on the right of (${i + 1},${j})`);
+                      } else {
+                          assert_less_than(space1.right, space2.left,
+                                           `Cell (${i},${j}) should be on the left of (${i + 1},${j})`);
+                      }
+                  }
+              }
+
+              for (var j = 0; j < rows.length - 1; j++) {
+                  var cells1 = Array.from(rows[j].getElementsByTagName("mtd"));
+                  var cells2 = Array.from(rows[j + 1].getElementsByTagName("mtd"));
+                  for (var i = 0; i < cells1.length; i++) {
+                      var space1 = cells1[i].firstElementChild.getBoundingClientRect();
+                      var space2 = cells2[i].firstElementChild.getBoundingClientRect();
+                      assert_equals(space1.left, space2.left,
+                                    `Cells (${i},${j}) and (${i},${j + 1}) should have same horizontal position`);
+                      assert_less_than(space1.bottom, space2.top,
+                                       `Cell (${i},${j}) should be above (${i},${j + 1})`);
+                  }
+              }
+          }, `Layout of ${id}`);
+
+      });
+      done();
+  }
+</script>
+</head>
+<body>
+  <div id="log"></div>
+  <p>
+    <math>
+      <mtable id="table-001">
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightblue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightgreen;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: blue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: green;"></mspace>
+          </mtd>
+        </mtr>
+      </mtable>
+      <mtable id="table-002">
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightblue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightgreen;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: cyan;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: purple;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: blue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: green;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: yellow;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: orange;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: black;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: red;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: gray;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: maroon;"></mspace>
+          </mtd>
+        </mtr>
+      </mtable>
+      <mtable id="table-003">
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightblue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightgreen;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: cyan;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: blue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: green;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: orange;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: black;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: maroon;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: gray;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: red;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: purple;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: yellow;"></mspace>
+          </mtd>
+
+        </mtr>
+      </mtable>
+    </math>
+  </p>
+  <p>
+    <math dir="rtl">
+      <mtable id="table-011">
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightblue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightgreen;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: blue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: green;"></mspace>
+          </mtd>
+        </mtr>
+      </mtable>
+      <mtable id="table-012">
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightblue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightgreen;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: cyan;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: purple;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: blue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: green;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: yellow;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: orange;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: black;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: red;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: gray;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: maroon;"></mspace>
+          </mtd>
+        </mtr>
+      </mtable>
+      <mtable id="table-013">
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightblue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: lightgreen;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: cyan;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: blue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: green;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: orange;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: black;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: maroon;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: gray;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: red;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: purple;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: yellow;"></mspace>
+          </mtd>
+
+        </mtr>
+      </mtable>
+    </math>
+  </p>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002-expected.txt
new file mode 100644 (file)
index 0000000..cfc7bb3
--- /dev/null
@@ -0,0 +1,6 @@
+
+PASS Vertical alignment of cells 
+PASS Horizontal alignment of cells 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002.html
new file mode 100644 (file)
index 0000000..f207bc0
--- /dev/null
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Basic table alignment</title>
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#table-or-matrix-mtable">
+<meta name="assert" content="Verify alignment of cells in basic 2x2, 4x3 and 3x4 math tables.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
+<script>
+  setup({ explicit_done: true });
+  window.addEventListener("load", runTests);
+  function runTests() {
+      var epsilon = 1;
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          const ascents = [40, 0, 20, 30, 10, 80, 0, 40, 70, 30];
+          const row = document.getElementById("vertical").firstElementChild;
+          const cells = Array.from(row.getElementsByTagName("mtd"));
+          for (var i = 0; i < cells.length - 1; i++) {
+              var space1 = cells[i].firstElementChild.getBoundingClientRect();
+              var space2 = cells[i + 1].firstElementChild.getBoundingClientRect();
+              assert_approx_equals(space1.top + ascents[i],
+                                   space2.top + ascents[i + 1],
+                                   epsilon,
+                                   `Baselines of cells ${i} and ${i + 1} should be aligned.`);
+          }
+      }, `Vertical alignment of cells`);
+
+      test(function() {
+          assert_true(MathMLFeatureDetection.has_mspace());
+          const table = document.getElementById("horizontal");
+          const rows = Array.from(table.getElementsByTagName("mtr"));
+          for (var j = 0; j < rows.length - 1; j++) {
+              var space1 = rows[j].firstElementChild.firstElementChild.getBoundingClientRect();
+              var space2 = rows[j + 1].firstElementChild.firstElementChild.getBoundingClientRect();
+              assert_approx_equals((space1.left + space1.right) / 2,
+                                   (space2.left + space2.right) / 2,
+                                   epsilon,
+                                   `Baselines of cells ${j} and ${j + 1} should be aligned.`);
+          }
+      }, `Horizontal alignment of cells`);
+
+      done();
+  }
+</script>
+</head>
+<body>
+  <div id="log"></div>
+  <p>
+    <math>
+      <mtable id="vertical">
+        <mtr>
+          <mtd>
+            <mspace width="10px" height="40px" depth="0px" style="background: lightblue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="0px" depth="40px" style="background: lightgreen;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="20px" depth="20px" style="background: cyan;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="30px" depth="10px" style="background: purple;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="10px" depth="30px" style="background: orange;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="80px" depth="0px" style="background: blue;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="0px" depth="80px" style="background: green;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="40px" depth="40px" style="background: yellow;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="70px" depth="30px" style="background: red;"></mspace>
+          </mtd>
+          <mtd>
+            <mspace width="10px" height="30px" depth="70px" style="background: black;"></mspace>
+          </mtd>
+        </mtr>
+      </mtable>
+    </math>
+  </p>
+  <p>
+    <math>
+      <mtable id="horizontal">
+        <mtr>
+          <mtd>
+            <mspace width="10px" height="10px" style="background: lightblue;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="40px" height="10px" style="background: lightgreen;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="30px" height="10px" style="background: cyan;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="20px" height="10px" style="background: purple;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="50px" height="10px" style="background: orange;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="100px" height="10px" style="background: blue;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="90px" height="10px" style="background: green;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="70px" height="10px" style="background: yellow;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="80px" height="10px" style="background: red;"></mspace>
+          </mtd>
+        </mtr>
+        <mtr>
+          <mtd>
+            <mspace width="40px" height="10px" style="background: black;"></mspace>
+          </mtd>
+        </mtr>
+      </mtable>
+    </math>
+  </p>
+</body>
+</html>
index c8d2e9e..df51c76 100644 (file)
@@ -14,4 +14,6 @@ Property values requiring vendor prefixes:
 None
 ------------------------------------------------------------------------
 List of files:
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-001.html
+/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-002.html
 /LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html
index 56c6987..6dadb37 100644 (file)
@@ -8,6 +8,7 @@
 <meta name="assert" content="Verify that dir, mathcolor, mathbackground and mathsize are mapped to CSS but that deprecated MathML3 attributes are not.">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
 <script src="/mathml/support/mathml-fragments.js"></script>
 <style>
   #container {
@@ -72,6 +73,7 @@
           }, `mathsize on the ${tag} element is mapped to CSS font-size`);
 
           test(function() {
+              assert_true(MathMLFeatureDetection.has_mathsize(), "Superseding attributes are supported");
               var properties = ["background-color", "color", "fontfamily", "font-size", "font-style", "font-weight"];
               var oldStyle = {};
               properties.forEach(property => {
index 9a85a17..a73031a 100644 (file)
       </mstyle>
     </math>
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script>
   </body>
 </html>
index 150443f..7572361 100644 (file)
@@ -31,5 +31,7 @@
       </mstyle>
     </math>
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script>
   </body>
 </html>
index 30be35c..2ed4559 100644 (file)
@@ -73,5 +73,7 @@
       </mtable>
     </math>
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script>
   </body>
 </html>
index d54a804..1e70cb6 100644 (file)
@@ -48,5 +48,7 @@
       </mstyle>
     </math>
 
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script>
   </body>
 </html>
index df25171..a288aac 100644 (file)
@@ -76,5 +76,8 @@
         </munderover>
       </mstyle>
     </math>
+
+    <script src="/mathml/support/feature-detection.js"></script>
+    <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script>
   </body>
 </html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt
new file mode 100644 (file)
index 0000000..3609d6b
--- /dev/null
@@ -0,0 +1,300 @@
+
+PASS maction preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL maction layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -15
+PASS maction preferred width calculation is not affected by white-space: normal; 
+FAIL maction layout is not affected by white-space: normal; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS maction preferred width calculation is not affected by float: right; 
+FAIL maction layout is not affected by float: right; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS maction preferred width calculation is not affected by align-content: end; justify-content: end; 
+FAIL maction layout is not affected by align-content: end; justify-content: end; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS maction preferred width calculation is not affected by align-self: end; justify-self: end; 
+FAIL maction layout is not affected by align-self: end; justify-self: end; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS maction preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL maction layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: block size expected 7.21875 +/- 1 but got 200
+PASS menclose preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL menclose layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 0) expected 7.96875 +/- 1 but got 3.984375
+PASS menclose preferred width calculation is not affected by white-space: normal; 
+PASS menclose layout is not affected by white-space: normal; 
+PASS menclose preferred width calculation is not affected by float: right; 
+PASS menclose layout is not affected by float: right; 
+PASS menclose preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS menclose layout is not affected by align-content: end; justify-content: end; 
+PASS menclose preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS menclose layout is not affected by align-self: end; justify-self: end; 
+PASS menclose preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS menclose layout is not affected by width: 100px !important; height: 200px !important; 
+PASS merror preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL merror layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 9.03125 +/- 1 but got 0
+PASS merror preferred width calculation is not affected by white-space: normal; 
+PASS merror layout is not affected by white-space: normal; 
+PASS merror preferred width calculation is not affected by float: right; 
+PASS merror layout is not affected by float: right; 
+PASS merror preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS merror layout is not affected by align-content: end; justify-content: end; 
+PASS merror preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS merror layout is not affected by align-self: end; justify-self: end; 
+PASS merror preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL merror layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: block size expected 7.21875 +/- 1 but got 200
+PASS mfrac preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mfrac layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 0 +/- 1 but got 9.59375
+PASS mfrac preferred width calculation is not affected by white-space: normal; 
+PASS mfrac layout is not affected by white-space: normal; 
+PASS mfrac preferred width calculation is not affected by float: right; 
+PASS mfrac layout is not affected by float: right; 
+PASS mfrac preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mfrac layout is not affected by align-content: end; justify-content: end; 
+PASS mfrac preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mfrac layout is not affected by align-self: end; justify-self: end; 
+PASS mfrac preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS mfrac layout is not affected by width: 100px !important; height: 200px !important; 
+PASS mi preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mi layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline size expected 9 +/- 1 but got 71.046875
+PASS mi preferred width calculation is not affected by white-space: normal; 
+PASS mi layout is not affected by white-space: normal; 
+PASS mi preferred width calculation is not affected by float: right; 
+PASS mi layout is not affected by float: right; 
+PASS mi preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mi layout is not affected by align-content: end; justify-content: end; 
+PASS mi preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mi layout is not affected by align-self: end; justify-self: end; 
+PASS mi preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL mi layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: inline size expected 72.640625 +/- 1 but got 101.59375
+PASS mmultiscripts preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mmultiscripts layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 0) expected 0 +/- 1 but got 5.1875
+PASS mmultiscripts preferred width calculation is not affected by white-space: normal; 
+PASS mmultiscripts layout is not affected by white-space: normal; 
+PASS mmultiscripts preferred width calculation is not affected by float: right; 
+PASS mmultiscripts layout is not affected by float: right; 
+PASS mmultiscripts preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mmultiscripts layout is not affected by align-content: end; justify-content: end; 
+PASS mmultiscripts preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mmultiscripts layout is not affected by align-self: end; justify-self: end; 
+PASS mmultiscripts preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS mmultiscripts layout is not affected by width: 100px !important; height: 200px !important; 
+PASS mn preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mn layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline size expected 9 +/- 1 but got 71.046875
+PASS mn preferred width calculation is not affected by white-space: normal; 
+PASS mn layout is not affected by white-space: normal; 
+PASS mn preferred width calculation is not affected by float: right; 
+PASS mn layout is not affected by float: right; 
+PASS mn preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mn layout is not affected by align-content: end; justify-content: end; 
+PASS mn preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mn layout is not affected by align-self: end; justify-self: end; 
+PASS mn preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL mn layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: inline size expected 71.046875 +/- 1 but got 100
+PASS mo preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mo layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline size expected 9 +/- 1 but got 71.046875
+PASS mo preferred width calculation is not affected by white-space: normal; 
+PASS mo layout is not affected by white-space: normal; 
+PASS mo preferred width calculation is not affected by float: right; 
+PASS mo layout is not affected by float: right; 
+PASS mo preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mo layout is not affected by align-content: end; justify-content: end; 
+PASS mo preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mo layout is not affected by align-self: end; justify-self: end; 
+PASS mo preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL mo layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: inline size expected 79.921875 +/- 1 but got 100
+PASS mover preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mover layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 0) expected 0 +/- 1 but got 8.609375
+PASS mover preferred width calculation is not affected by white-space: normal; 
+PASS mover layout is not affected by white-space: normal; 
+PASS mover preferred width calculation is not affected by float: right; 
+PASS mover layout is not affected by float: right; 
+PASS mover preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mover layout is not affected by align-content: end; justify-content: end; 
+PASS mover preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mover layout is not affected by align-self: end; justify-self: end; 
+PASS mover preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS mover layout is not affected by width: 100px !important; height: 200px !important; 
+PASS mpadded preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mpadded layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
+PASS mpadded preferred width calculation is not affected by white-space: normal; 
+PASS mpadded layout is not affected by white-space: normal; 
+PASS mpadded preferred width calculation is not affected by float: right; 
+PASS mpadded layout is not affected by float: right; 
+PASS mpadded preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mpadded layout is not affected by align-content: end; justify-content: end; 
+PASS mpadded preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mpadded layout is not affected by align-self: end; justify-self: end; 
+PASS mpadded preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS mpadded layout is not affected by width: 100px !important; height: 200px !important; 
+PASS mphantom preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mphantom layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
+PASS mphantom preferred width calculation is not affected by white-space: normal; 
+PASS mphantom layout is not affected by white-space: normal; 
+PASS mphantom preferred width calculation is not affected by float: right; 
+PASS mphantom layout is not affected by float: right; 
+PASS mphantom preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mphantom layout is not affected by align-content: end; justify-content: end; 
+PASS mphantom preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mphantom layout is not affected by align-self: end; justify-self: end; 
+PASS mphantom preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL mphantom layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: block size expected 7.21875 +/- 1 but got 200
+PASS mroot preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mroot layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline size expected 20.515625 +/- 1 but got 9.796875
+PASS mroot preferred width calculation is not affected by white-space: normal; 
+PASS mroot layout is not affected by white-space: normal; 
+PASS mroot preferred width calculation is not affected by float: right; 
+PASS mroot layout is not affected by float: right; 
+PASS mroot preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mroot layout is not affected by align-content: end; justify-content: end; 
+PASS mroot preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mroot layout is not affected by align-self: end; justify-self: end; 
+PASS mroot preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS mroot layout is not affected by width: 100px !important; height: 200px !important; 
+PASS mrow preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mrow layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
+PASS mrow preferred width calculation is not affected by white-space: normal; 
+PASS mrow layout is not affected by white-space: normal; 
+PASS mrow preferred width calculation is not affected by float: right; 
+PASS mrow layout is not affected by float: right; 
+PASS mrow preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mrow layout is not affected by align-content: end; justify-content: end; 
+PASS mrow preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mrow layout is not affected by align-self: end; justify-self: end; 
+PASS mrow preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL mrow layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: block size expected 7.21875 +/- 1 but got 200
+PASS ms preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL ms layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline size expected 9 +/- 1 but got 71.046875
+PASS ms preferred width calculation is not affected by white-space: normal; 
+PASS ms layout is not affected by white-space: normal; 
+PASS ms preferred width calculation is not affected by float: right; 
+PASS ms layout is not affected by float: right; 
+PASS ms preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS ms layout is not affected by align-content: end; justify-content: end; 
+PASS ms preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS ms layout is not affected by align-self: end; justify-self: end; 
+PASS ms preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL ms layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: inline size expected 71.046875 +/- 1 but got 100
+PASS mspace preferred width calculation is not affected by writing-mode: vertical-rl; 
+PASS mspace layout is not affected by writing-mode: vertical-rl; 
+PASS mspace preferred width calculation is not affected by white-space: normal; 
+PASS mspace layout is not affected by white-space: normal; 
+PASS mspace preferred width calculation is not affected by float: right; 
+PASS mspace layout is not affected by float: right; 
+PASS mspace preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mspace layout is not affected by align-content: end; justify-content: end; 
+PASS mspace preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mspace layout is not affected by align-self: end; justify-self: end; 
+PASS mspace preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS mspace layout is not affected by width: 100px !important; height: 200px !important; 
+PASS msqrt preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL msqrt layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline size expected 19.71875 +/- 1 but got 9
+PASS msqrt preferred width calculation is not affected by white-space: normal; 
+PASS msqrt layout is not affected by white-space: normal; 
+PASS msqrt preferred width calculation is not affected by float: right; 
+PASS msqrt layout is not affected by float: right; 
+PASS msqrt preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS msqrt layout is not affected by align-content: end; justify-content: end; 
+PASS msqrt preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS msqrt layout is not affected by align-self: end; justify-self: end; 
+PASS msqrt preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS msqrt layout is not affected by width: 100px !important; height: 200px !important; 
+PASS mstyle preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mstyle layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 8.03125 +/- 1 but got 0
+PASS mstyle preferred width calculation is not affected by white-space: normal; 
+PASS mstyle layout is not affected by white-space: normal; 
+PASS mstyle preferred width calculation is not affected by float: right; 
+PASS mstyle layout is not affected by float: right; 
+PASS mstyle preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mstyle layout is not affected by align-content: end; justify-content: end; 
+PASS mstyle preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mstyle layout is not affected by align-self: end; justify-self: end; 
+PASS mstyle preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL mstyle layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: block size expected 7.21875 +/- 1 but got 200
+PASS msub preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL msub layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected 80.3125 +/- 1 but got 5.8125
+PASS msub preferred width calculation is not affected by white-space: normal; 
+PASS msub layout is not affected by white-space: normal; 
+PASS msub preferred width calculation is not affected by float: right; 
+PASS msub layout is not affected by float: right; 
+PASS msub preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS msub layout is not affected by align-content: end; justify-content: end; 
+PASS msub preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS msub layout is not affected by align-self: end; justify-self: end; 
+PASS msub preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS msub layout is not affected by width: 100px !important; height: 200px !important; 
+PASS msubsup preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL msubsup layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 0) expected 0 +/- 1 but got 5.1875
+PASS msubsup preferred width calculation is not affected by white-space: normal; 
+PASS msubsup layout is not affected by white-space: normal; 
+PASS msubsup preferred width calculation is not affected by float: right; 
+PASS msubsup layout is not affected by float: right; 
+PASS msubsup preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS msubsup layout is not affected by align-content: end; justify-content: end; 
+PASS msubsup preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS msubsup layout is not affected by align-self: end; justify-self: end; 
+PASS msubsup preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS msubsup layout is not affected by width: 100px !important; height: 200px !important; 
+PASS msup preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL msup layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 0) expected 0 +/- 1 but got 5.1875
+PASS msup preferred width calculation is not affected by white-space: normal; 
+PASS msup layout is not affected by white-space: normal; 
+PASS msup preferred width calculation is not affected by float: right; 
+PASS msup layout is not affected by float: right; 
+PASS msup preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS msup layout is not affected by align-content: end; justify-content: end; 
+PASS msup preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS msup layout is not affected by align-self: end; justify-self: end; 
+PASS msup preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS msup layout is not affected by width: 100px !important; height: 200px !important; 
+PASS mtable preferred width calculation is not affected by writing-mode: vertical-rl; 
+PASS mtable layout is not affected by writing-mode: vertical-rl; 
+PASS mtable preferred width calculation is not affected by white-space: normal; 
+PASS mtable layout is not affected by white-space: normal; 
+PASS mtable preferred width calculation is not affected by float: right; 
+PASS mtable layout is not affected by float: right; 
+PASS mtable preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mtable layout is not affected by align-content: end; justify-content: end; 
+PASS mtable preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mtable layout is not affected by align-self: end; justify-self: end; 
+PASS mtext preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL mtext layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline size expected 9 +/- 1 but got 71.046875
+PASS mtext preferred width calculation is not affected by white-space: normal; 
+PASS mtext layout is not affected by white-space: normal; 
+PASS mtext preferred width calculation is not affected by float: right; 
+PASS mtext layout is not affected by float: right; 
+PASS mtext preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS mtext layout is not affected by align-content: end; justify-content: end; 
+PASS mtext preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS mtext layout is not affected by align-self: end; justify-self: end; 
+PASS mtext preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL mtext layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: inline size expected 71.046875 +/- 1 but got 100
+PASS munder preferred width calculation is not affected by writing-mode: vertical-rl; 
+PASS munder layout is not affected by writing-mode: vertical-rl; 
+PASS munder preferred width calculation is not affected by white-space: normal; 
+PASS munder layout is not affected by white-space: normal; 
+PASS munder preferred width calculation is not affected by float: right; 
+PASS munder layout is not affected by float: right; 
+PASS munder preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS munder layout is not affected by align-content: end; justify-content: end; 
+PASS munder preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS munder layout is not affected by align-self: end; justify-self: end; 
+PASS munder preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS munder layout is not affected by width: 100px !important; height: 200px !important; 
+PASS munderover preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL munderover layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 0) expected 0 +/- 1 but got 8.609375
+PASS munderover preferred width calculation is not affected by white-space: normal; 
+PASS munderover layout is not affected by white-space: normal; 
+PASS munderover preferred width calculation is not affected by float: right; 
+PASS munderover layout is not affected by float: right; 
+PASS munderover preferred width calculation is not affected by align-content: end; justify-content: end; 
+PASS munderover layout is not affected by align-content: end; justify-content: end; 
+PASS munderover preferred width calculation is not affected by align-self: end; justify-self: end; 
+PASS munderover layout is not affected by align-self: end; justify-self: end; 
+PASS munderover preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+PASS munderover layout is not affected by width: 100px !important; height: 200px !important; 
+PASS semantics preferred width calculation is not affected by writing-mode: vertical-rl; 
+FAIL semantics layout is not affected by writing-mode: vertical-rl; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -15
+PASS semantics preferred width calculation is not affected by white-space: normal; 
+FAIL semantics layout is not affected by white-space: normal; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS semantics preferred width calculation is not affected by float: right; 
+FAIL semantics layout is not affected by float: right; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS semantics preferred width calculation is not affected by align-content: end; justify-content: end; 
+FAIL semantics layout is not affected by align-content: end; justify-content: end; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS semantics preferred width calculation is not affected by align-self: end; justify-self: end; 
+FAIL semantics layout is not affected by align-self: end; justify-self: end; assert_approx_equals: inline position (child 1) expected -88.3125 +/- 1 but got -8
+PASS semantics preferred width calculation is not affected by width: 100px !important; height: 200px !important; 
+FAIL semantics layout is not affected by width: 100px !important; height: 200px !important; assert_approx_equals: block size expected 7.21875 +/- 1 but got 200
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001.html b/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001.html
new file mode 100644 (file)
index 0000000..e3e3806
--- /dev/null
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Ignored CSS properties</title>
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+<meta name="assert" content="Verify style with ignored properties does not affect MathML layout.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
+<script src="/mathml/support/layout-comparison.js"></script>
+<script src="/mathml/support/mathml-fragments.js"></script>
+<script>
+  var epsilon = 1;
+
+  setup({ explicit_done: true });
+  window.addEventListener("load", runTests);
+
+  function runTests() {
+
+      for (tag in MathMLFragments) {
+          if (!FragmentHelper.isValidChildOfMrow(tag))
+              continue;
+
+          var ignoredProperties = [
+              "writing-mode: vertical-rl;",
+              "white-space: normal;",
+              "float: right;",
+              "align-content: end; justify-content: end;",
+              "align-self: end; justify-self: end;",
+          ];
+          if (tag !== "mtable") {
+              ignoredProperties.push("width: 100px !important; height: 200px !important;");
+          }
+
+          ignoredProperties.forEach(ignoredStyle => {
+              document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\
+<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\
+<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\
+</div>`);
+              var div = document.body.lastElementChild;
+
+              // Create MathML structure with ignored style properties.
+              var elementContainer = div.firstElementChild;
+              var elementContainerWidth = elementContainer.getBoundingClientRect().width;
+              var element = FragmentHelper.element(elementContainer);
+              if (!FragmentHelper.isEmpty(tag))
+                  FragmentHelper.forceNonEmptyDescendants(element);
+              element.setAttribute("style", ignoredStyle);
+              Array.from(element.getElementsByTagNameNS("*", FragmentHelper.mathml_namespace)).forEach(descendant => {
+                  descendant.setAttribute("style", ignoredStyle);
+              });
+
+              var referenceContainer = div.lastElementChild;
+              var referenceContainerWidth = referenceContainer.getBoundingClientRect().width;
+              var reference = FragmentHelper.element(referenceContainer);
+              if (!FragmentHelper.isEmpty(tag))
+                  FragmentHelper.forceNonEmptyDescendants(reference);
+
+              test(function() {
+                  assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
+                  assert_approx_equals(elementContainerWidth, referenceContainerWidth, epsilon);
+              }, `${tag} preferred width calculation is not affected by ${ignoredStyle}`);
+
+              test(function() {
+                  assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
+                  compareLayout(element, reference, epsilon);
+              }, `${tag} layout is not affected by ${ignoredStyle}`);
+
+              div.style = "display: none;"; // Hide the div after measurement.
+          });
+      }
+
+      done();
+  }
+</script>
+</head>
+<body>
+  <div id="log"></div>
+</body>
+</html>
index 9b3852d..6390ebf 100644 (file)
@@ -7,6 +7,7 @@
     <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#legacy-mathml-style-attributes">
     <meta name="assert" content="Verify that CSS font-size keywords are invalid for the mathsize attribute.">
     <link rel="match" href="mathsize-attribute-css-keywords-ref.html">
+    <script src="/mathml/support/feature-detection.js"></script>
   </head>
   <body>
     <p>Test passes if you see ten "A" of equal size:</p>
@@ -22,5 +23,7 @@
       <mtext mathsize="larger">A</mtext>
       <mtext mathsize="smaller">A</mtext>
     </math>
+   <script src="/mathml/support/feature-detection.js"></script>
+   <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mathsize");</script>
   </body>
 </html>
index 745b103..abddf52 100644 (file)
@@ -7,6 +7,7 @@
     <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#legacy-mathml-style-attributes">
     <meta name="assert" content="Verify that legacy values for mathsize have no effect.">
     <link rel="match" href="mathsize-attribute-legacy-values-ref.html">
+    <script src="/mathml/support/feature-detection.js"></script>
   </head>
   <body>
     <p>Test passes if you see four "A" of equal size:</p>
@@ -16,5 +17,7 @@
       <mtext mathsize="medium">A</mtext>
       <mtext mathsize="big">A</mtext>
     </math>
+   <script src="/mathml/support/feature-detection.js"></script>
+   <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mathsize");</script>
   </body>
 </html>
index 3390fc0..29b1de8 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#italic-mappings">
 <link rel="match" href="mathvariant-auto-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mi> is equivalent to an <mi> with the transformed italic unicode character.">
 <style>
index 2bfb8b7..2837ab9 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#bold-fraktur-mappings">
 <link rel="match" href="mathvariant-bold-fraktur-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a bold-fraktur mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 5454b86..90135f6 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#bold-italic-mappings">
 <link rel="match" href="mathvariant-bold-italic-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a bold-italic mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 112c292..241a44a 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#bold-sans-serif-mappings">
 <link rel="match" href="mathvariant-bold-sans-serif-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a bold-sans-serif mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 47cf016..b974f82 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#bold-script-mappings">
 <link rel="match" href="mathvariant-bold-script-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a bold-script mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index a14fadf..d6ea644 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#bold-mappings">
 <link rel="match" href="mathvariant-bold-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a bold mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 4650617..3a99515 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#double-struck-mappings">
 <link rel="match" href="mathvariant-double-struck-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a double-struck mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 72f20b7..db6e21b 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fraktur-mappings">
 <link rel="match" href="mathvariant-fraktur-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a fraktur mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 4f35d38..efff6fd 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#initial-mappings">
 <link rel="match" href="mathvariant-initial-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a initial mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index f30a2c7..cd7eb5c 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#italic-mappings">
 <link rel="match" href="mathvariant-italic-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a italic mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index a673224..f67bda5 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#looped-mappings">
 <link rel="match" href="mathvariant-looped-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a looped mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 9e76b10..e39ea32 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#monospace-mappings">
 <link rel="match" href="mathvariant-monospace-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a monospace mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 832fd15..2f050ef 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#sans-serif-bold-italic-mappings">
 <link rel="match" href="mathvariant-sans-serif-bold-italic-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a sans-serif-bold-italic mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 7711798..c741899 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#sans-serif-italic-mappings">
 <link rel="match" href="mathvariant-sans-serif-italic-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a sans-serif-italic mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index afceecf..744988c 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#sans-serif-mappings">
 <link rel="match" href="mathvariant-sans-serif-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a sans-serif mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index c7f93a8..8ebcae1 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#script-mappings">
 <link rel="match" href="mathvariant-script-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a script mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index e2c8286..5752e2b 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretched-mappings">
 <link rel="match" href="mathvariant-stretched-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a stretched mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index fa8bea4..2d2c6eb 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-mathvariant-attribute">
 <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#new-text-transform-values">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#tailed-mappings">
 <link rel="match" href="mathvariant-tailed-ref.html"/>
 <meta name="assert" content="Verify that a single-char <mtext> with a tailed mathvariant is equivalent to an <mtext> with the transformed unicode character.">
 <style>
index 1caebf1..52d4154 100644 (file)
@@ -22,7 +22,6 @@
         if (!FragmentHelper.isValidChildOfMrow(tag) ||
             FragmentHelper.isEmpty(tag))
             continue;
-        // TODO: Add floats too?
         ["display: none",
          "display: contents",
          "position: absolute",
             var reference = FragmentHelper.element(referenceContainer);
             FragmentHelper.forceNonEmptyElement(reference);
 
-            var epsilon = 1;
-
             test(function() {
-                // FIXME(fwang): Feature detection should be done per-tag.
-                assert_true(MathMLFeatureDetection.has_mspace());
+                assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
                 assert_approx_equals(elementContainerWidth, referenceContainerWidth, epsilon);
             }, `${tag} preferred width calculation is not affected by children with "${style}" style`);
 
             test(function() {
-                // FIXME(fwang): Feature detection should be done per-tag.
-                assert_true(MathMLFeatureDetection.has_mspace());
+                assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
                 compareLayout(element, reference, epsilon);
             }, `${tag} layout is not affected by children with "${style}" style`);
 
index 06a719d..38d89aa 100644 (file)
@@ -7,6 +7,7 @@
 <meta name="assert" content="Verify that border is taken into account.">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
+<script src="/mathml/support/feature-detection.js"></script>
 <script src="/mathml/support/mathml-fragments.js"></script>
 <script src="/mathml/support/box-comparison.js"></script>
 <script>
@@ -25,6 +26,7 @@
 
         if (FragmentHelper.isEmpty(tag)) {
             test(function() {
+                assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
                 var s = compareSizeWithAndWithoutStyle(tag, style);
                 assert_approx_equals(s.element_width_delta, 30 + 40, epsilon, "left/right border");
                 assert_approx_equals(s.element_height_delta, 50 + 60, epsilon, "top/bottom border");
@@ -34,6 +36,7 @@
         }
 
         test(function() {
+            assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
             var s = compareSpaceWithAndWithoutStyle(tag, style);
             assert_approx_equals(s.left_delta, 30, epsilon, "left border");
             assert_approx_equals(s.right_delta, 40, epsilon, "right border");
@@ -45,6 +48,7 @@
         }, `Border properties on ${tag}`);
 
         test(function() {
+            assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`);
             var s = compareSpaceWithAndWithoutStyle(tag, style, null, "rtl");
             assert_approx_equals(s.left_delta, 30, epsilon, "left border");
             assert_approx_equals(s.right_delta, 40, epsilon, "right border");