Closed Bug 1845461 Opened 7 months ago Closed 7 months ago

Add deprecation warning and use counter for deprecated mathvariant usages

Categories

(Core :: MathML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Follow-up of bug 1821980.

In MathML Core, mathvariant is only allowed on the mi element and can only take value mathvariant="normal".

This bug is about adding a deprecation warning to inform users and a use counter to evaluate whether we can get rid of it.

Attachment #9345747 - Attachment description: WIP: Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio → Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio
Attachment #9345747 - Attachment description: Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio → Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod
Pushed by fred.wang@free.fr:
https://hg.mozilla.org/integration/autoland/rev/b1b74e5913ac
Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod

Backed out for causing failures on browser_misused_characters_in_strings.js

[task 2023-07-27T18:42:32.497Z] 18:42:32     INFO - TEST-PASS | browser/base/content/test/static/browser_misused_characters_in_strings.js | Found 115 .properties files to scan for misused characters - 
[task 2023-07-27T18:42:32.498Z] 18:42:32     INFO - Buffered messages finished
[task 2023-07-27T18:42:32.500Z] 18:42:32     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_misused_characters_in_strings.js | jar:file:///builds/worker/workspace/build/application/firefox/omni.ja!/chrome/en-US/locale/en-US/global/dom/dom.properties with key=MathML_DeprecatedMathVariantWarning has a misused single-quote. Single-quoted strings should use Unicode ‘foo’ instead of 'foo'. - 
[task 2023-07-27T18:42:32.501Z] 18:42:32     INFO - Stack trace:
[task 2023-07-27T18:42:32.502Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:test_ok:1580
[task 2023-07-27T18:42:32.503Z] 18:42:32     INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForError:88
[task 2023-07-27T18:42:32.504Z] 18:42:32     INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForErrors:109
[task 2023-07-27T18:42:32.505Z] 18:42:32     INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:checkAllTheProperties:165
[task 2023-07-27T18:42:32.506Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:handleTask:1131
[task 2023-07-27T18:42:32.507Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1203
[task 2023-07-27T18:42:32.507Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1345
[task 2023-07-27T18:42:32.508Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1120
[task 2023-07-27T18:42:32.509Z] 18:42:32     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1056
[task 2023-07-27T18:42:32.511Z] 18:42:32     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-07-27T18:42:32.513Z] 18:42:32     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_misused_characters_in_strings.js | jar:file:///builds/worker/workspace/build/application/firefox/omni.ja!/res/locale/dom/dom.properties with key=MathML_DeprecatedMathVariantWarning has a misused single-quote. Single-quoted strings should use Unicode ‘foo’ instead of 'foo'. - 
[task 2023-07-27T18:42:32.514Z] 18:42:32     INFO - Stack trace:
[task 2023-07-27T18:42:32.515Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:test_ok:1580
[task 2023-07-27T18:42:32.516Z] 18:42:32     INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForError:88
[task 2023-07-27T18:42:32.517Z] 18:42:32     INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForErrors:109
[task 2023-07-27T18:42:32.518Z] 18:42:32     INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:checkAllTheProperties:165
[task 2023-07-27T18:42:32.519Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:handleTask:1131
[task 2023-07-27T18:42:32.520Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1203
[task 2023-07-27T18:42:32.521Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1345
[task 2023-07-27T18:42:32.522Z] 18:42:32     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1120
[task 2023-07-27T18:42:32.523Z] 18:42:32     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1056
[task 2023-07-27T18:42:32.524Z] 18:42:32     INFO - Leaving test bound checkAllTheProperties
[task 2023-07-27T18:42:32.524Z] 18:42:32     INFO - Entering test bound checkAllTheDTDs
[task 2023-07-27T18:42:32.525Z] 18:42:32     INFO - TEST-PASS | browser/base/content/test/static/browser_misused_characters_in_strings.js | Found 1 .dtd files to scan for misused characters - 
Flags: needinfo?(fwang)

This seems invalid warning, I'll add an exception in browser_misused_characters_in_strings.js

Flags: needinfo?(fwang)
Pushed by fred.wang@free.fr:
https://hg.mozilla.org/integration/autoland/rev/9c19f2cfc93a
Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod

We need to document that mathvariant attributes on non-mi elements or taking value other than "normal" is deprecated.

MDN article is https://developer.mozilla.org/en-US/docs/Web/MathML/Global_attributes/mathvariant which for now still considers it as a global attribute with several values.

Keywords: dev-doc-needed
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Regressions: 1845910

Backed out for causing central-as-beta simulation failures(Bug 1845910).

[task 2023-07-28T10:51:41.450Z] 10:51:41     INFO - TEST-START | layout/mathml/tests/test_bug1845461.html
[task 2023-07-28T10:51:41.616Z] 10:51:41     INFO - GECKO(5117) | [Parent 5117, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/netwerk/dns/nsEffectiveTLDService.cpp:234
[task 2023-07-28T10:51:41.616Z] 10:51:41     INFO - GECKO(5117) | [Parent 5117, Main Thread] WARNING: 'NS_FAILED(rv)', file /builds/worker/checkouts/gecko/toolkit/components/antitracking/AntiTrackingUtils.cpp:515
[task 2023-07-28T10:51:41.721Z] 10:51:41     INFO - GECKO(5117) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpnoe02dck.mozrunner/runtests_leaks_tab_pid5382.log
[task 2023-07-28T10:51:41.768Z] 10:51:41     INFO - GECKO(5117) | [Child 5382, Main Thread] WARNING: could not set real-time limit in CubebUtils::InitLibrary: file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:655
[task 2023-07-28T10:51:41.953Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.955Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.956Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.959Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.959Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.960Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.961Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.976Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.978Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.980Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.981Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:41.983Z] 10:51:41     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:42.205Z] 10:51:42     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:42.216Z] 10:51:42     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:42.218Z] 10:51:42     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, NS_OK) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1150
[task 2023-07-28T10:51:42.276Z] 10:51:42     INFO - GECKO(5117) | JavaScript error: resource://gre/modules/XULStore.sys.mjs, line 60: Error: Can't find profile directory.
[task 2023-07-28T10:51:42.285Z] 10:51:42     INFO - GECKO(5117) | [Child 5329, Main Thread] WARNING: '!mLocalStore', file /builds/worker/checkouts/gecko/dom/xul/XULPersist.cpp:146
[task 2023-07-28T10:51:43.030Z] 10:51:43     INFO - GECKO(5117) | [Parent 5117, IPC I/O Parent] WARNING: [1.1]: GetUserData call for port 'D8B181E3B05249C5.A46EA4A01587DCE0' failed: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:406
[task 2023-07-28T10:51:43.321Z] 10:51:43     INFO - TEST-INFO | started process screentopng
[task 2023-07-28T10:51:43.556Z] 10:51:43     INFO - TEST-INFO | screentopng: exit 0
[task 2023-07-28T10:51:43.556Z] 10:51:43     INFO - TEST-UNEXPECTED-FAIL | layout/mathml/tests/test_bug1845461.html | number of errors - got 2, expected 1
[task 2023-07-28T10:51:43.556Z] 10:51:43     INFO - SimpleTest.is@https://mochi.test:8888/tests/SimpleTest/SimpleTest.js:507:14
[task 2023-07-28T10:51:43.557Z] 10:51:43     INFO - @https://mochi.test:8888/tests/layout/mathml/tests/test_bug1845461.html:20:21
[task 2023-07-28T10:51:43.557Z] 10:51:43     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-07-28T10:51:43.558Z] 10:51:43     INFO - TEST-UNEXPECTED-FAIL | layout/mathml/tests/test_bug1845461.html | error message - got "The Components object is deprecated. It will soon be removed.", expected "“mathvariant='fraktur'” on MathML elements is deprecated and will be removed at a future date."
[task 2023-07-28T10:51:43.558Z] 10:51:43     INFO - SimpleTest.is@https://mochi.test:8888/tests/SimpleTest/SimpleTest.js:507:14
[task 2023-07-28T10:51:43.559Z] 10:51:43     INFO - @https://mochi.test:8888/tests/layout/mathml/tests/test_bug1845461.html:23:25
[task 2023-07-28T10:51:43.559Z] 10:51:43     INFO - GECKO(5117) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2023-07-28T10:51:43.560Z] 10:51:43     INFO - GECKO(5117) | MEMORY STAT | vsize 2554MB | residentFast 138MB | heapAllocated 10MB
[task 2023-07-28T10:51:43.883Z] 10:51:43     INFO - TEST-OK | layout/mathml/tests/test_bug1845461.html | took 2434ms
[task 2023-07-28T10:51:44.092Z] 10:51:44     INFO - TEST-START | layout/mathml/tests/test_bug330964.html
Flags: needinfo?(fwang)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 117 Branch → ---
Status: REOPENED → RESOLVED
Closed: 7 months ago7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 117 Branch → ---
Attachment #9345747 - Attachment description: Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod → WIP: Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod
Attachment #9345747 - Attachment description: WIP: Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod → Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod
Pushed by fred.wang@free.fr:
https://hg.mozilla.org/integration/autoland/rev/586e39ae9160
Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod
Status: REOPENED → RESOLVED
Closed: 7 months ago7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

the latest patch doesn't seem to fix bug 1845910.
today's beta-simulation

Flags: needinfo?(fwang)

OK, I'm not sure why since the Components object is not used anymore. Maybe indirectly via SpecialPowers? I'll try to run the test locally with the dom.use_components_shim pref disabled.

Otherwise a workaround would be to force the pref to be on as it is done in https://searchfox.org/mozilla-central/source/js/xpconnect/tests/chrome/test_bug795275.xhtml#24

Flags: needinfo?(fwang)

FF118 Docs work for this can be tracked in https://github.com/mdn/content/issues/28849 (and is complete bar reviews)

You need to log in before you can comment on or make changes to this bug.