Closed Bug 1924672 Opened 10 months ago Closed 3 months ago

Support for CSS units in MathMLElement::ParseNumericValue

Categories

(Core :: MathML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: fredw, Assigned: harpsichen)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

Small step toward bug 1574751.

See https://searchfox.org/mozilla-central/rev/754074e05178e017ef6c3d8e30428ffa8f1b794d/dom/mathml/MathMLElement.cpp#309

Comparing https://drafts.csswg.org/css-values/#length-value Vs https://www.w3.org/TR/MathML3/chapter2.html#fund.units the following are missing:

ch => eCSSUnit_Char
cap => eCSSUnit_CapHeight
ic => eCSSUnit_Ideographic
vm => eCSSUnit_VW
vh => eCSSUnit_VH
vi, vb => eCSSUnit_VW or eCSSUnit_VH
vmin => eCSSUnit_VMin
vmax => eCSSUnit_VMax
rem => eCSSUnit_RootEM
lh => eCSSUnit_LineHeight
rlh => eCSSUnit_RootLineHeight

Maybe the SVGLengthUnits macros could help?

https://searchfox.org/mozilla-central/source/dom/svg/SVGLengthUnits.h

Or roll your own perhaps?

Thanks, I don't know... I think ideally we would just like to map the MathML attributes that currently rely on MathMLElement::ParseNumericValue to CSS length properties, like we do for many other MathML attributes. But using internal CSS properties instead. But we are currently stuck on this because of legacy MathML3 syntax. Just tweaking MathMLElement::ParseNumericValue could be a first step to support these units for now.

Assigning to Harry, he is willing to give a try.

Assignee: nobody → hchen
Attachment #9440937 - Attachment description: Bug 1924672 - Add support for CSS units in MathMLElement::ParseNumericValue. r?fredw → Bug 1924672 - Add WPT tests and support for more CSS units in MathML. r?fredw

(In reply to Frédéric Wang (:fredw) from comment #6)

https://treeherder.mozilla.org/jobs?repo=try&revision=17968fb1405e7d11959ca661000c024407d59a43

This is green but lando warns that some comments are unresolved. Can you please go over https://phabricator.services.mozilla.com/differential/revision/inlines/230738/ and check whether they have all be addressed / or no longer relevant (and if so mark them as Done). Thanks!

Flags: needinfo?(harpsichen)

Oops sorry, I managed to miss marking a few as done, but I believe they should all be addressed!

Flags: needinfo?(harpsichen)

https://phabricator.services.mozilla.com/D230738 failed to land when I tried last Friday, it has some conflicts https://lando.moz.tools/D230738/ ; can you please rebase?

Flags: needinfo?(harpsichen)

Sure, should be done

Flags: needinfo?(harpsichen) → needinfo?(fwang)
Pushed by fwang@igalia.com: https://hg.mozilla.org/integration/autoland/rev/4a74b1fc4b79 Add WPT tests and support for more CSS units in MathML. r=fredw,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/52262 for changes under testing/web-platform/tests

Backed out for causing build bustages @ nsMathMLmfracFrame.cpp

Flags: needinfo?(harpsichen)
Upstream PR was closed without merging

Sorry, my Firefox build isn't working, it should be fixed now. (Lando seems to be down for maintenance)

Flags: needinfo?(harpsichen)

(In reply to Harry Chen from comment #15)

Sorry, my Firefox build isn't working, it should be fixed now. (Lando seems to be down for maintenance)

So have you built the updated patch locally? If not, I guess better to send to try server again before landing.

Flags: needinfo?(fwang) → needinfo?(harpsichen)

Not yet -- I'm trying to send it to try now but Lando is down, I'll try again soon

Flags: needinfo?(harpsichen)

OK, I guess you mean uploading to phabricator, not landing via lando.

(In reply to Frédéric Wang (:fredw) from comment #18)

OK, I guess you mean uploading to phabricator, not landing via lando.

Sorry, I meant the Lando try server, but in any case I don't think I have permissions (unless the landing job ID 129244 exists?). Would it be possible to send this to try please?

Flags: needinfo?(fwang)
Flags: needinfo?(fwang)
Pushed by fwang@igalia.com: https://hg.mozilla.org/integration/autoland/rev/2bd090dba619 Add WPT tests and support for more CSS units in MathML. r=fredw,emilio
Regressions: 1963880
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
Upstream PR merged by moz-wptsync-bot

This addition should probably be mentioned in the related browser compat data.

Sebastian

Keywords: dev-doc-needed
Summary: Support fore CSS units in MathMLElement::ParseNumericValue → Support for CSS units in MathMLElement::ParseNumericValue
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: