Closed Bug 1788645 Opened 2 years ago Closed 2 years ago

Do not reset font-weight/font-style when mathvariant is specified

Categories

(Core :: MathML, defect)

defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

MathML1 had fontstyle/fontweight attributes mapped to font-style/font-weight properties.
Later versions introduced the mathvariant attribute instead which takes precedence over the fontstyle/fontweight attributes.

So when we have <math fontstyle="italic" fontweight="bold" mathvariant="fraktur"> we had to cancel the effect of fontstyle/fontweight. For that purpose, a hack was originally introduced in Gecko's style resolver and tested by layout/reftests/mathml/mathvariant-3.html

Later this hack was replicated in Stylo, see bug 1367301.

Finally the deprecated fontstyle/fontweight attributes and corresponding tests were removed in bug 1783841. However, the hack is still around, and this non-standard behavior can be confusing for users e.g. https://github.com/dginev/ar5iv/issues/184#issuecomment-1213416142

Let's try to remove it in this bug.

Attached file Testcase

In the past, mathvariant was cancelling the effect of legacy
fontstyle/fontweight attributes by resetting the font-style/font-weight
properties. These legacy attributes have been removed in bug 1783841,
so remove this hack from Stylo and add corresponding WPT test.

Pushed by fred.wang@free.fr:
https://hg.mozilla.org/integration/autoland/rev/8161856de5f6
Do not reset font-weight/font-style when mathvariant is specified. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35773 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

For the record, change in Stylo was not enough. I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1789197 as a follow-up.

Upstream PR merged by jgraham
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: