Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove text-transform tests for math values, except math-auto #38490

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

fred-wang
Copy link
Contributor

@fred-wang fred-wang commented Feb 14, 2023

See https://github.com/w3c/mathml-core/issues/182

- mathml/tools/utils/mathfont.py: migrate to Python 3.

- mathml/tools/mathvariant-transforms.py: Convert the loop generating
  the CSS and MathML tests into a helper function. For MathML, we
  continue to call it for all mathvariant values until these tests
  are imported into WebKit/Mozilla. For CSS, we only keep the math-auto
  tests and remove the "tentative" in the name.

- css/css-text/text-transform/math/text-transform-math-*: Tests removed,
  or renamed to drop the tentative in the name (for math-auto). After
  regeneration, the code points are properly sorted.

- mathml/relations/css-styling/mathvariant-*.html: The only test that
  aligns with the latest version of MathML Core is mathvariant-auto.html
  but as said above, we keep the other tests for now until these tests
  are imported into WebKit/Mozilla. After regeneration, the code points
  are properly sorted.

- mathml/relations/css-styling/attribute-mapping-002.html: We cannot test
  with fraktur/double-struck anymore. Instead, rely on inheritance of
  text-transform on the parent. Note that mathvariant mapping is now only
  done for the <mi> element.

See w3c/mathml-core#182

- mathml/tools/utils/mathfont.py: migrate to Python 3.

- mathml/tools/mathvariant-transforms.py: Convert the loop generating
  the CSS and MathML tests into a helper function. For MathML, we
  continue to call it for all mathvariant values until these tests
  are imported into WebKit/Mozilla. For CSS, we only keep the math-auto
  tests and remove the "tentative" in the name.

- css/css-text/text-transform/math/text-transform-math-*: Tests removed,
  or renamed to drop the tentative in the name (for math-auto). After
  regeneration, the code points are properly sorted.

- mathml/relations/css-styling/mathvariant-*.html: The only test that
  aligns with the latest version of MathML Core is mathvariant-auto.html
  but as said above, we keep the other tests for now until these tests
  are imported into WebKit/Mozilla. After regeneration, the code points
  are properly sorted.

- mathml/relations/css-styling/attribute-mapping-002.html: We cannot test
  with fraktur/double-struck anymore. Instead, rely on inheritance of
  text-transform on the parent. Note that mathvariant mapping is now only
  done for the <mi> element.
@fred-wang fred-wang marked this pull request as ready for review February 24, 2023 08:28
@wpt-pr-bot
Copy link
Collaborator

There are no reviewers for this pull request besides its author. Please reach out on the chat room to get help with this. Thank you!

Copy link
Contributor

@rwlbuis rwlbuis left a comment

Choose a reason for hiding this comment

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

LGTM.

@fred-wang fred-wang merged commit 08bac45 into master Feb 24, 2023
@fred-wang fred-wang deleted the text-transform-math branch February 24, 2023 09:07
aarongable pushed a commit to chromium/chromium that referenced this pull request Mar 6, 2023
The Math WG decided in [1] to remove support for the new text-transform
values (except math-auto) and for mathvariant (except "normal" on <mi>).
WPT tests have been updated accordingly in [2] but tests needed by
Firefox/WebKit to check their mathvariant implementation have been kept
until they are imported to their internal repos.

This CL updates our mathvariant implementation accordingly and tweak the
parts that were assuming full mathvariant support in the future (bug
1076420).

mathml_element/mathml_token_element: Mathvariant is no longer a global
attribute, but only supported on the `<mi>` element. It also only
takes value "normal". So remove the TODO and place mapping in the
subclass instead.

style/computed_style.cc: Only `text-transform: math-auto` remains, so
remove the TODO and rename the helper function ApplyMathAutoTransform.

math_transform_fuzzer.cc/math_transform.cc: Only italic transform is
performed, so remove the TODO and rename the function ItalicMathVariant.

third_party/blink/web_tests/TestExpectations: Update expectations.

Bug: 1076420

[1] w3c/mathml-core#182
[2] web-platform-tests/wpt#38490

Change-Id: If9f4530c23db60f50816785a6a87c05ae13e09fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4288752
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1113453}
moz-wptsync-bot pushed a commit that referenced this pull request Mar 20, 2023
In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] #38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

gecko-commit: 0464baff0fd759f483bba1d23d4f83496da0df5a
gecko-reviewers: emilio
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 20, 2023
In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871
moz-wptsync-bot pushed a commit that referenced this pull request Mar 20, 2023
In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] #38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 20, 2023
In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871
marcoscaceres pushed a commit that referenced this pull request Mar 28, 2023
See w3c/mathml-core#182

- mathml/tools/utils/mathfont.py: migrate to Python 3.

- mathml/tools/mathvariant-transforms.py: Convert the loop generating
  the CSS and MathML tests into a helper function. For MathML, we
  continue to call it for all mathvariant values until these tests
  are imported into WebKit/Mozilla. For CSS, we only keep the math-auto
  tests and remove the "tentative" in the name.

- css/css-text/text-transform/math/text-transform-math-*: Tests removed,
  or renamed to drop the tentative in the name (for math-auto). After
  regeneration, the code points are properly sorted.

- mathml/relations/css-styling/mathvariant-*.html: The only test that
  aligns with the latest version of MathML Core is mathvariant-auto.html
  but as said above, we keep the other tests for now until these tests
  are imported into WebKit/Mozilla. After regeneration, the code points
  are properly sorted.

- mathml/relations/css-styling/attribute-mapping-002.html: We cannot test
  with fraktur/double-struck anymore. Instead, rely on inheritance of
  text-transform on the parent. Note that mathvariant mapping is now only
  done for the <mi> element.
jgraham pushed a commit that referenced this pull request Jul 24, 2023
In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] #38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio
moz-wptsync-bot pushed a commit that referenced this pull request Jul 24, 2023
In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] #38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 2, 2023
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Aug 4, 2023
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Aug 30, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Sep 23, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Oct 8, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Oct 10, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Oct 15, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Oct 28, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Nov 8, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Nov 25, 2024
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
MrAlex94 pushed a commit to BrowserWorks/Waterfox that referenced this pull request Jan 6, 2025
…PT tests. Bug 1821980, a=testonly

Automatic update from web-platform-tests
Update mathvariant WPT tests.

In MathML Core, the mathvariant attribute is now restricted to the mi
element and to value "normal". Some related WPT tests were updated in
[1]. This commit moves other tests assuming full mathvariant support
into our internal tests. It also tweaks some existing tests to only
rely on MathML Core features.

* mathvariant-basic-transforms-with-default-font.html: This test assumes support for italic, bold and bold-italic mathvariants so move it to internal tests.
* mathvariant-case-sensitivity.html: This one tests all mathvariant values, so move it to internal tests.
* mathvariant-double-struck-font-style-font-weight.html: This test assumes support for double-struck mathvariant so move it to internal tests.
* Other generated mathvariant-*.html tests for each value (other than "normal") are also moved to internal tests.
* direction.html: Remove use of mathvariant="bold" since this test is actually testing the dir attribute.
* presentational-hints-001.html: Verify that local author style for text-transform wins over presentation hints for mathvariant. Tweak it to use value "normal" on the mi element and text-transform: uppercase.
* presentational-hints-002.html: This is testing dynamic setting of mathvariant. Tweak it to use value "normal" on the mi element.

[1] web-platform-tests/wpt#38490

Differential Revision: https://phabricator.services.mozilla.com/D172871

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 1ea808cbf56afaf7a890319225b3c93d24726888
gecko-reviewers: emilio

--
Align mathvariant implementation on MathML Core.

In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821980
gecko-commit: 72da4ec089de56dc3c3cdb69e879b66b5fd3a3ab
gecko-reviewers: emilio, jfkthame

--

wpt-commits: da2b6993b2e91a0b352e4a6650ca9d6565deb997, 1a2dcdf30e01fe1011d1127bd47653baf3b1484e
wpt-pr: 39077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants