-
Notifications
You must be signed in to change notification settings - Fork 15
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 mathvariant from core (except 'normal') #182
Comments
This may be an opportune place and time to ask early a connected question: Are these two formulations identical in MathML Core + CSS, by default? <mi mathvariant="normal">x</mi>
<mi style="text-transform:none;">x</mi> |
I'll leave that question to @fred-wang to answer. I just spotted that MDN includes What is different is There is hopefully a WPT test to make sure that |
@dginev: Yes and yes for MathML Core, the spec says to treat mathvariant="normal" as a presentational hint @NSoiffer MDN automatically parses the MathML Core spec to generate the documentation of formal definition/syntax but really the CSS WG only approved I didn't get what you mean but in MathML Core
(they are more subtilities with font-weight/font-style, like they can probably try to programmatically italicize/boldify a glyph from the normal font if bold/italic/bold-italic fonts don't provide the proper glyph, or rely on a single variable font to perform these transformations, but again all of these is out of the scope of the MathML Core spec and is specified elsewhere) |
I wonder what's the status of this? It's currently one of the biggest issue for web-platform-tests/interop#197 (comment) |
@fred-wang I believe as far as the WG was concerned, we resolved to remove Maybe the word "reluctant" in the description was misleading - there was group consensus to move forward with the removal. I am not aware of other WG activity since, except for our clarifying questions above. My guess is that the next step here is to make the changes to the Core text. |
Spec updated. We need to remove tests. However, WebKit/Firefox still implement the mathvariant attribute so they need to copy the tests in their internal suites. |
Was the consensus to keep |
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: Keep them for now. After regeneration, the code points are properly sorted.
I just submitted a PR to start updating the tests. But for attribute-mapping-002.html I need to know whether mathvariant would still be global or mi-specific. |
As far as I recall, we did not discuss a restriction to Maybe we could sneak that question in for this Thursday @NSoiffer ? |
Somewhere along the line I said it didn't make sense for it to be a global attr as it is very specific to the I can add this to the agenda for the meeting on Thursday. |
the unicode math alphabet blocks include digits so it's quite natural to use mathvariant on mn to get 𝟙 or whatever, and I've certainly used that in the past. But since the proposal is to only allow the value |
@fred-wang the group discussed this today and we had consensus to accept your suggestion. Namely, restrict |
We discussed this at the meeting today and agreed that since |
Thanks, I'll update the spec and test PR. |
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.
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.
Reviewing this in the meeting today, we think we can close this and trust that @fred-wang will correct us and reopen if we're wrong. |
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}
…ues, except math-auto, a=testonly Automatic update from web-platform-tests Remove text-transform tests for math values, except math-auto (#38490) 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. -- wpt-commits: 08bac45e83cdf9980c00db1e94c0d385d0ca28c3 wpt-pr: 38490
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.
…ues, except math-auto, a=testonly Automatic update from web-platform-tests Remove text-transform tests for math values, except math-auto (#38490) 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. -- wpt-commits: 08bac45e83cdf9980c00db1e94c0d385d0ca28c3 wpt-pr: 38490
I'm starting a new issue based on a side topic mentioned in #181:
The Math WG (full) discussed this today and the reluctant resolution is that now is a good time has come to get rid of
mathvariant
from core, especially since it sounds like it can't be supported in core.mathvariant="normal"
does need to be kept. It is a little strange to have an attribute with that name, but it, like many things in other languages, has that name because of history.The text was updated successfully, but these errors were encountered: