WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
281232
<mspace width="1ch"> doesn't work
https://bugs.webkit.org/show_bug.cgi?id=281232
Summary
<mspace width="1ch"> doesn't work
Simon Fraser (smfr)
Reported
2024-10-10 10:03:25 PDT
Created
attachment 472896
[details]
Test case <mspace width="1ch"> doesn't work in Safari or Firefox. It works in Chrome.
Attachments
Test case
(300 bytes, text/html)
2024-10-10 10:03 PDT
,
Simon Fraser (smfr)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-10-10 10:04:29 PDT
<
rdar://problem/137687694
>
Simon Fraser (smfr)
Comment 2
2024-10-10 10:04:53 PDT
Testcase is derived from a PR on the AVIF spec, so this has real-world impact.
Frédéric Wang (:fredw)
Comment 3
2024-10-10 10:25:30 PDT
Thanks the issue is probably that Firefox and WebKit initially relied on the MathML definition of lengths from MathML3 which does not accept ch. They haven't completely migrated to MathML Core's definition, which is just CSS's <length-percentage>:
https://developer.mozilla.org/en-US/docs/Web/MathML/Values#legacy_mathml_lengths
Regarding tests, web-platform-tests/mathml/relations/css-styling/lengths-1.html web-platform-tests/mathml/relations/css-styling/lengths-2.html don't seem to cover this case. Ideally, we should just switch to the CSS parser for MathML lengths, but meanwhile we could just tweak MathMLElement::LengthType to handle this unit.
Frédéric Wang (:fredw)
Comment 4
2024-10-15 03:16:11 PDT
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 cap ic vm vh vi vmin vmax rem lh rlh Maybe a first step would be to switch from MathMLElement::Length to CSSValue (see
https://searchfox.org/wubkat/rev/cde6cf2e21001cb4055a5f891ce3d7abe5eee3e9/Source/WebCore/css/CSSUnits.h#57
) similar to what Firefox does. I guess ideally we should just map MathML attribute values to presentational hints similar to what we do for mathsize for example:
https://searchfox.org/wubkat/search?q=addPropertyToPresentationalHintStyle&path=Source%2FWebCore%2Fmathml&case=false®exp=false
; but using internal (non-webexposed) CSS properties instead. But probably this can be for follow-up bugs.
Frédéric Wang (:fredw)
Comment 5
2024-10-17 01:04:47 PDT
Assigning to Harry, he is willing to give a try.
Frédéric Wang (:fredw)
Comment 6
2025-04-21 21:34:10 PDT
I'm removing Harry from assignee as he has completed his Coding Experience at Igalia. @Harry: If work on this in your personal time in the future, feel free to take this bug again.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug