Support for CSS units in MathMLElement::ParseNumericValue
Categories
(Core :: MathML, enhancement)
Tracking
()
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.
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
Comment 1•10 months ago
|
||
Maybe the SVGLengthUnits macros could help?
https://searchfox.org/mozilla-central/source/dom/svg/SVGLengthUnits.h
Or roll your own perhaps?
Reporter | ||
Comment 2•10 months ago
|
||
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.
Comment 3•10 months ago
|
||
The SVG code for that is: https://searchfox.org/mozilla-central/source/dom/svg/SVGElement.cpp#1071
Reporter | ||
Comment 4•10 months ago
|
||
Assigning to Harry, he is willing to give a try.
Assignee | ||
Comment 5•8 months ago
|
||
vi and vb need special handling since they depend on the writing
mode; see https://bugzilla.mozilla.org/show_bug.cgi?id=1077525
and https://drafts.csswg.org/css-values/#relative-lengths.
Updated•8 months ago
|
Reporter | ||
Comment 6•4 months ago
|
||
Reporter | ||
Comment 7•4 months ago
|
||
(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!
Assignee | ||
Comment 8•4 months ago
|
||
Oops sorry, I managed to miss marking a few as done, but I believe they should all be addressed!
Reporter | ||
Comment 9•4 months ago
|
||
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?
Assignee | ||
Comment 10•3 months ago
|
||
Sure, should be done
Comment 11•3 months ago
|
||
Comment 13•3 months ago
|
||
Backed out for causing build bustages @ nsMathMLmfracFrame.cpp
Assignee | ||
Comment 15•3 months ago
|
||
Sorry, my Firefox build isn't working, it should be fixed now. (Lando seems to be down for maintenance)
Reporter | ||
Comment 16•3 months ago
|
||
(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.
Assignee | ||
Comment 17•3 months ago
|
||
Not yet -- I'm trying to send it to try now but Lando is down, I'll try again soon
Reporter | ||
Comment 18•3 months ago
|
||
OK, I guess you mean uploading to phabricator, not landing via lando.
Assignee | ||
Comment 19•3 months ago
|
||
(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?
Assignee | ||
Comment 20•3 months ago
|
||
Nevermind, looks green (failure seems unrelated): https://treeherder.mozilla.org/jobs?repo=try&revision=5b27c0233717c94a622de18f0fe2791f1dbcd77d
Comment 21•3 months ago
|
||
![]() |
||
Comment 22•3 months ago
|
||
bugherder |
Comment 24•2 months ago
|
||
This addition should probably be mentioned in the related browser compat data.
Sebastian
Description
•