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 some deprecated attributes #5

Closed
fred-wang opened this issue Feb 14, 2019 · 9 comments
Closed

Remove some deprecated attributes #5

fred-wang opened this issue Feb 14, 2019 · 9 comments
Labels
compatibility Issues affecting backward compatibility MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification need specification update Issues requiring specification changes

Comments

@fred-wang
Copy link

fred-wang commented Feb 14, 2019

This proposal is to remove the following attributes:

  1. general attribute: other.
  2. math attributes: macros, mode.
  3. mglyph attributes: fontfamily, index. See also Remove/Deprecate mglyph element #25
  4. token elements attributes: fontfamily, fontweight, fontstyle, fontsize, color, background. See also Simplification of the mstyle element #1
  5. deprecated namedspace attributes: veryverythinmathspace,
    verythinmathspace, thinmathspace, mediummathspace, thickmathspace,
    verythickmathspace, veryverythickmathspace. https://mathml-refresh.github.io/mathml/chapter3.html#id.3.3.4.2.1 See also Simplification of the mstyle element #1 and Deprecate/Remove namedspaces length values #75

Math WG thread: https://lists.w3.org/Archives/Public/www-math/2016Aug/0008.html

@physikerwelt
Copy link
Member

  1. Should we suggest using data- instead?

@fred-wang fred-wang added the MathML 4 Issues affecting the MathML 4 specification label Feb 22, 2019
@fred-wang
Copy link
Author

These attributes are currently not in MathML Core, so this is just for MathML 4.

@fred-wang
Copy link
Author

fred-wang commented Mar 14, 2019

cc @rwlbuis, @emilio

We agreed on 2019-02-25 that currently deprecated attributes should not go into MathML Core: https://lists.w3.org/Archives/Public/public-mathml4/2019Feb/0048.html

I checked the spec & schema and cannot find any of the attributes listed in #5 (comment)

We still need to:

  • Check WPT tests (I doubt there are contained in any test)
  • Send intent-to-remove to mozilla/webkit-dev mailing lists (maybe old Math WG too?).
  • Remove browser implementation.
  • Decide what to do for the full MathML spec (remove them?).
  • Add polyfill to https://github.com/mathml-refresh/mathml-polyfills if necessary.

Note: some deprecated attributes might still be used like font or colors (e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1027354 ). Others have never been implemented or have already been removed without complaints ( e.g. namedspace attributes ).

Also, "mathvariant" is supposed to take precedent over the deprecated attributes "fontweight" and "fontstyle". In term of CSS, that means that mathvariant has to reset font-style/font-weight to avoid weird results. There are some hacks in Gecko/Stylo that can be removed once we get rid of "fontweight" and "fontstyle".

@fred-wang fred-wang added the compatibility Issues affecting backward compatibility label Mar 20, 2019
@fred-wang
Copy link
Author

From https://lists.w3.org/Archives/Public/public-mathml4/2019Mar/0026.html

  1. Remove "other" from MathML full (maybe suggest data-*)
  2. Remove macros, mode from MathML full
  3. Remove fontfamily, index from MathML full
  4. Deprecate fontfamily, fontweight, fontstyle, fontsize, color, background from MathML full
  5. Remove named attributes thinmathspace etc

@fred-wang
Copy link
Author

Resolution:
#5 (comment)

Specification:
Removal/Deprecation from full, with extra explanations.

Implementation:
WebKit: https://bugs.webkit.org/show_bug.cgi?id=197492
Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1548524
Not implemented in Chromium.

Polyfill:
TBD

Tests:

  • Remove WPT tests or check that these values are not supported.

@fred-wang fred-wang added need implementation update need polyfill Issues requiring implementation changes need specification update Issues requiring specification changes need tests Issues related to writing WPT tests labels May 16, 2019
@fred-wang
Copy link
Author

These are not in core per #5 (comment) ; @davidcarlisle please check the full spec and do the necessary change, if any.

@fred-wang fred-wang removed the need specification update Issues requiring specification changes label Jun 5, 2019
@fred-wang
Copy link
Author

fred-wang commented Aug 15, 2019

The mode attribute has been removed from Gecko:

https://bugzilla.mozilla.org/show_bug.cgi?id=1573438

(WebKit has never implemented it)

Polyfill:

window.addEventListener("load", function() {
    const namespaceURI = "http://www.w3.org/1998/Math/MathML";
    Array.from(document.body.getElementsByTagNameNS(namespaceURI, "math")).
        forEach(math => {
            if (math.hasAttribute("mode")) {
                var value = math.getAttribute("mode").replace("display", "block");
                math.removeAttribute("mode");
                if (!math.hasAttribute("display"))
                    math.setAttribute("display", value);
            }
        });
});

moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 28, 2019
See w3c/mathml#5 (comment)
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1548524
gecko-commit: 69105b8565ce19ceb8c26757d0a81138854f1d13
gecko-integration-branch: autoland
gecko-reviewers: emilio
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Aug 28, 2019
See w3c/mathml#5 (comment)
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

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

--HG--
extra : moz-landing-system : lando
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 28, 2019
See w3c/mathml#5 (comment)
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1548524
gecko-commit: 69105b8565ce19ceb8c26757d0a81138854f1d13
gecko-integration-branch: autoland
gecko-reviewers: emilio
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Aug 29, 2019
See w3c/mathml#5 (comment)
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

Differential Revision: https://phabricator.services.mozilla.com/D43111
yury-s pushed a commit to yury-s/webkit-http that referenced this issue Sep 9, 2019
https://bugs.webkit.org/show_bug.cgi?id=197492

Patch by Rob Buis <[email protected]> on 2019-09-09
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Import relevant WPT test.

* web-platform-tests/mathml/relations/css-styling/attribute-mapping-001-expected.txt: Added.
* web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html: Added.

Source/WebCore:

Remove some MathML3 deprecated attributes:
w3c/mathml#5 (comment)

This change also maps the dir attribute to direction for MathML Core.

Test: imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html

* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::collectStyleForPresentationAttribute):

LayoutTests:

Disable the MathML Core flag for tests assuming MathML3 behavior.

* mathml/presentation/attributes-background-color-expected.html:
* mathml/presentation/attributes-background-color.html:
* mathml/presentation/attributes-mathvariant.html:
* mathml/presentation/direction-overall.html:
* mathml/presentation/mstyle-css-attributes.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@fred-wang fred-wang added MathML Core Issues affecting the MathML Core specification need specification update Issues requiring specification changes and removed need implementation update labels Sep 16, 2019
@fred-wang
Copy link
Author

  • other, macros, fontfamily, index have never been implemented in browsers
  • fontfamily, fontweight, fontstyle, fontsize, color, background was removed in https://phabricator.services.mozilla.com/D43111 and tests were added to mathml/relations/css-styling/attribute-mapping-001.html
  • mode was removed in https://phabricator.services.mozilla.com/D41742 but no test were added
  • named attributes thinmathspace etc were removed a long time ago from Gecko but I can't find any test

@fred-wang
Copy link
Author

* mode was removed in https://phabricator.services.mozilla.com/D41742 but no test were added
* named attributes thinmathspace etc were removed a long time ago from Gecko but I can't find any test

We have removed support for namedspaces length values in #75 and have tests for that. So it does not seem necessary to test the legacy namedspaces attributes that allowed to override these values.

@fred-wang fred-wang removed the need tests Issues related to writing WPT tests label Sep 17, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 18, 2019
…e attribute has no effect., a=testonly

Automatic update from web-platform-tests
Add MathML reftest to check that the mode attribute has no effect. (#19113)

See w3c/mathml#5
--

wpt-commits: e9f2d000237d43f74136cfd40e5a3454f5b54b70
wpt-pr: 19113
dbaron pushed a commit to dbaron/gecko that referenced this issue Sep 19, 2019
…e attribute has no effect., a=testonly

Automatic update from web-platform-tests
Add MathML reftest to check that the mode attribute has no effect. (#19113)

See w3c/mathml#5
--

wpt-commits: e9f2d000237d43f74136cfd40e5a3454f5b54b70
wpt-pr: 19113
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
See w3c/mathml#5 (comment)
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

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

UltraBlame original commit: 69105b8565ce19ceb8c26757d0a81138854f1d13
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…e attribute has no effect., a=testonly

Automatic update from web-platform-tests
Add MathML reftest to check that the mode attribute has no effect. (#19113)

See w3c/mathml#5
--

wpt-commits: e9f2d000237d43f74136cfd40e5a3454f5b54b70
wpt-pr: 19113

UltraBlame original commit: e2a070880d4f8ad517c375e84ed32b1200e7a6fc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
See w3c/mathml#5 (comment)
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

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

UltraBlame original commit: 69105b8565ce19ceb8c26757d0a81138854f1d13
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
See w3c/mathml#5 (comment)
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

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

UltraBlame original commit: 69105b8565ce19ceb8c26757d0a81138854f1d13
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…e attribute has no effect., a=testonly

Automatic update from web-platform-tests
Add MathML reftest to check that the mode attribute has no effect. (#19113)

See w3c/mathml#5
--

wpt-commits: e9f2d000237d43f74136cfd40e5a3454f5b54b70
wpt-pr: 19113

UltraBlame original commit: e2a070880d4f8ad517c375e84ed32b1200e7a6fc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
…e attribute has no effect., a=testonly

Automatic update from web-platform-tests
Add MathML reftest to check that the mode attribute has no effect. (#19113)

See w3c/mathml#5
--

wpt-commits: e9f2d000237d43f74136cfd40e5a3454f5b54b70
wpt-pr: 19113

UltraBlame original commit: e2a070880d4f8ad517c375e84ed32b1200e7a6fc
@NSoiffer NSoiffer removed the need polyfill Issues requiring implementation changes label May 20, 2020
ryanhaddad pushed a commit to WebKit/WebKit that referenced this issue Dec 22, 2020
https://bugs.webkit.org/show_bug.cgi?id=197492

Patch by Rob Buis <[email protected]> on 2019-09-09
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Import relevant WPT test.

* web-platform-tests/mathml/relations/css-styling/attribute-mapping-001-expected.txt: Added.
* web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html: Added.

Source/WebCore:

Remove some MathML3 deprecated attributes:
w3c/mathml#5 (comment)

This change also maps the dir attribute to direction for MathML Core.

Test: imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html

* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::collectStyleForPresentationAttribute):

LayoutTests:

Disable the MathML Core flag for tests assuming MathML3 behavior.

* mathml/presentation/attributes-background-color-expected.html:
* mathml/presentation/attributes-background-color.html:
* mathml/presentation/attributes-mathvariant.html:
* mathml/presentation/direction-overall.html:
* mathml/presentation/mstyle-css-attributes.html:

Canonical link: https://commits.webkit.org/215237@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues affecting backward compatibility MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification need specification update Issues requiring specification changes
Projects
None yet
Development

No branches or pull requests

3 participants