WebKit icon indicating copy to clipboard operation
WebKit copied to clipboard

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

Open fred-wang opened this issue 3 years ago โ€ข 7 comments

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

Reviewed by NOBODY (OOPS!).

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.

https://github.com/WebKit/WebKit/commit/8158dcf00def149d87534daf64bb09b18aa14095

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
โœ… ๐Ÿ›  watch โœ… ๐Ÿงช mac-AS-debug-wk2
โœ… ๐Ÿ›  watch-sim โœ… ๐Ÿงช mac-wk2-stress

fred-wang avatar Oct 05 '22 12:10 fred-wang

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

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

webkit-commit-queue avatar Oct 21 '22 07:10 webkit-commit-queue