Skip to content

[GTK][WPE] Remove support for named spaces and nonzero unitless lengths - #5023

Merged
webkit-early-warning-system merged 1 commit into
WebKit:mainfrom
fred-wang:eng/197494
Oct 21, 2022
Merged

webkit-early-warning-system merged 1 commit into
WebKit:mainfrom
fred-wang:eng/197494

Conversation

@fred-wang

@fred-wang fred-wang commented Oct 5, 2022 •

Copy link
Copy Markdown
Contributor

f243e31

[GTK][WPE] Remove support for named spaces and nonzero unitless lengths
https://bugs.webkit.org/show_bug.cgi?id=197494

Reviewed by Rob Buis.

This commit removes support for named spaces and nonzero unitless
lengths in WebKit when the MathML Core flag is enabled [1] [2],
which is currently the case on GTK and WPE platforms. It also adds
a few more WPT tests to cover attributes implemented in WebKit.

[1] https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute/Values#legacy_mathml_lengths
[2] https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mpadded#legacy_syntax

* LayoutTests/TestExpectations: Remove a test fixed by this change.
* LayoutTests/accessibility/mac/mathml-line-fraction.html: This test uses a nonzero unitless value, so disable the MathML Core.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html: enable MathML Core.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002-expected.txt: Update expectation.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002.html: enable MathML Core.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-legacy-length-values-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-lspace-rspace-legacy-length-values-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-lspace-rspace-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-legacy-length-values-expected.txt: Added.
  There seem to be an existing stretching bug unrelated to this change that make maxsize tests fail.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/mspace-legacy-length-values-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/mspace-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2-expected.txt: Update expectation.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2-expected.txt: Ditto.
* LayoutTests/mathml/non-core/positive-namedspace.html: Renamed from LayoutTests/mathml/presentation/positive-namedspace.html.
  This test is specifically tested namedspace so disable disable the MathML Core. Also move it to non-core directory.
* LayoutTests/mathml/non-core/positive-namedspace-expected.html: Ditto.
* LayoutTests/mathml/presentation/mo-form-expected.html: This test uses namedspaces but actually does not need to do so, so tweak it.
* LayoutTests/mathml/presentation/non-bmp-operators-spacing-expected.html: Ditto.
* LayoutTests/mathml/presentation/non-bmp-operators-stretching-expected.html: Ditto.
* Source/WebCore/mathml/MathMLFractionElement.cpp:
(WebCore::MathMLFractionElement::lineThickness): Pass boolean to indicate whether to support legacy MathML lengths.
* Source/WebCore/mathml/MathMLPresentationElement.cpp:
(WebCore::MathMLPresentationElement::parseNumberAndUnit): Make parsing fails for nonzero unitless.
(WebCore::MathMLPresentationElement::parseMathMLLength): Make parsing fails for namedspace and pass boolean to indicate whether to support
  legacy MathML lengths.
(WebCore::MathMLPresentationElement::cachedMathMLLength):
* Source/WebCore/mathml/MathMLPresentationElement.h: Add new boolean to indicate whether to support legacy MathML lengths.

Canonical link: https://commits.webkit.org/255818@main

c02b45b

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios   🛠 mac ✅ 🛠 wpe   🛠 🧪 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-debug ✅ 🛠 gtk   🛠 wincairo
✅ 🧪 webkitperl   🧪 ios-wk2 ✅ 🛠 mac-AS-debug ✅ 🧪 gtk-wk2
  🧪 api-ios   🧪 api-mac   🧪 api-gtk
✅ 🛠 tv   🧪 mac-wk1
✅ 🛠 tv-sim   🧪 mac-wk2
✅ 🛠 🧪 merge ✅ 🛠 watch   🧪 mac-AS-debug-wk2
✅ 🛠 watch-sim   🧪 mac-wk2-stress

@fred-wang fred-wang self-assigned this Oct 5, 2022
@fred-wang fred-wang added MathML For bugs specific to MathML. WebKit Nightly Build labels Oct 5, 2022
@fred-wang
fred-wang marked this pull request as draft October 5, 2022 12:31
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 5, 2022
@fred-wang fred-wang removed the merging-blocked Applied to prevent a change from being merged label Oct 7, 2022
@fred-wang fred-wang changed the title [GTK][WPE] Remove support for named spaces and nonzero unitless lengths try and fix test failures Oct 7, 2022
@fred-wang fred-wang changed the title try and fix test failures add tests for lspace/rspace Oct 7, 2022
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 8, 2022
@fred-wang fred-wang changed the title add tests for lspace/rspace [GTK][WPE] Remove support for named spaces and nonzero unitless lengths Oct 8, 2022
@fred-wang
fred-wang requested a review from rwlbuis October 10, 2022 12:41

@rwlbuis rwlbuis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is coreMathMLEnabled accurate? Is it not more a question of support mode for unitless/named spaces? I think the name could be better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I guess I can rename.

@fred-wang
fred-wang marked this pull request as ready for review October 13, 2022 10:55
@fred-wang fred-wang added the merge-queue Applied to send a pull request to merge-queue label Oct 13, 2022
@webkit-ews-buildbot webkit-ews-buildbot removed the merge-queue Applied to send a pull request to merge-queue label Oct 13, 2022
@fred-wang fred-wang added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Oct 14, 2022
@fred-wang fred-wang closed this Oct 14, 2022
@fred-wang fred-wang reopened this Oct 14, 2022
@fred-wang fred-wang added merge-queue Applied to send a pull request to merge-queue and removed merge-queue Applied to send a pull request to merge-queue labels Oct 21, 2022
https://bugs.webkit.org/show_bug.cgi?id=197494

Reviewed by Rob Buis.

This commit removes support for named spaces and nonzero unitless
lengths in WebKit when the MathML Core flag is enabled [1] [2],
which is currently the case on GTK and WPE platforms. It also adds
a few more WPT tests to cover attributes implemented in WebKit.

[1] https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute/Values#legacy_mathml_lengths
[2] https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mpadded#legacy_syntax

* LayoutTests/TestExpectations: Remove a test fixed by this change.
* LayoutTests/accessibility/mac/mathml-line-fraction.html: This test uses a nonzero unitless value, so disable the MathML Core.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-001.html: enable MathML Core.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002-expected.txt: Update expectation.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002.html: enable MathML Core.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-legacy-length-values-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-lspace-rspace-legacy-length-values-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-lspace-rspace-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-legacy-length-values-expected.txt: Added.
  There seem to be an existing stretching bug unrelated to this change that make maxsize tests fail.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/mspace-legacy-length-values-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/mspace-legacy-length-values.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2-expected.txt: Update expectation.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2-expected.txt: Ditto.
* LayoutTests/mathml/non-core/positive-namedspace.html: Renamed from LayoutTests/mathml/presentation/positive-namedspace.html.
  This test is specifically tested namedspace so disable disable the MathML Core. Also move it to non-core directory.
* LayoutTests/mathml/non-core/positive-namedspace-expected.html: Ditto.
* LayoutTests/mathml/presentation/mo-form-expected.html: This test uses namedspaces but actually does not need to do so, so tweak it.
* LayoutTests/mathml/presentation/non-bmp-operators-spacing-expected.html: Ditto.
* LayoutTests/mathml/presentation/non-bmp-operators-stretching-expected.html: Ditto.
* Source/WebCore/mathml/MathMLFractionElement.cpp:
(WebCore::MathMLFractionElement::lineThickness): Pass boolean to indicate whether to support legacy MathML lengths.
* Source/WebCore/mathml/MathMLPresentationElement.cpp:
(WebCore::MathMLPresentationElement::parseNumberAndUnit): Make parsing fails for nonzero unitless.
(WebCore::MathMLPresentationElement::parseMathMLLength): Make parsing fails for namedspace and pass boolean to indicate whether to support
  legacy MathML lengths.
(WebCore::MathMLPresentationElement::cachedMathMLLength):
* Source/WebCore/mathml/MathMLPresentationElement.h: Add new boolean to indicate whether to support legacy MathML lengths.

Canonical link: https://commits.webkit.org/255818@main
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 255818@main (f243e31): https://commits.webkit.org/255818@main

Reviewed commits have been landed. Closing PR #5023 and removing active labels.

@webkit-early-warning-system
webkit-early-warning-system merged commit f243e31 into WebKit:main Oct 21, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 21, 2022
@fred-wang
fred-wang deleted the eng/197494 branch October 21, 2022 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MathML For bugs specific to MathML.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants