Closed Bug 1574749 Opened 5 years ago Closed 5 years ago

Remove support for nonzero unitless lengths

Categories

(Core :: MathML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

(Blocks 2 open bugs)

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(1 file)

MathML says that things like linethickness="5" should be interpreted as 500%. This diverges from CSS which only accepts "0" and interpret it as pixels. The MathML CG agreed to remove this: https://github.com/mathml-refresh/mathml/issues/7

Blocks: 1574751

See https://github.com/mathml-refresh/mathml/issues/24
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/-yV6wb3klSA

This commit introduces a new preference option
mathml.nonzero_unitless_lengths.disabled to disable MathML nonzero unitless
values like "5" for 500%. MathML nonzero unitless are now disabled by default
but it could be easily enabled again later if we decide otherwise.

  • test_bug553917.html is updated to check that these values now cause an error
    message to be logged into the console rather than a deprecated warning.
    Additionally, the test checking invalid double dots "2..0" is updated to
    not use unitless syntax.
  • The old test 355548-3.xml checks support for mathsize names and also uses
    several features that are going to be deprecated. So it is just run with
    the proper preference adjustment.
  • mfrac-linethickness-2.xhtml and number-size-1.xhtml check support for
    unitless lengths so they are now run with that support enabled.
  • Failure expectations for WPT tests frac-linethickness-001.html and
    lengths-1.html are remove now that we pass these tests.
    We get more assertion passing for the "Legacy numbers" test of
    lengths-2.html ; however there are still some issues to address
    (see bug 1574751).
Blocks: 157475
No longer blocks: 1574751
Depends on: 1548527
Keywords: checkin-needed

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e45398b51329
Remove support for nonzero unitless lengths. r=emilio

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Regressions: 1575200
Blocks: 1574751

For the dev doc: For any nonzero number x, the unitless value ${x} can be replaced with ${y}% where y = 100 * x. For example "2" can be replaced with "200%".

In Firefox 69 I'm getting a warning when setting linethickness="0" on mfrac for binomial coefficients. Shouldn't a plain zero be allowed here? Will this behavior change with version 70? Thanks.

(In reply to Paul Masson from comment #6)

In Firefox 69 I'm getting a warning when setting linethickness="0" on mfrac for binomial coefficients. Shouldn't a plain zero be allowed here? Will this behavior change with version 70? Thanks.

I think warning "Unitless values are deprecated in MathML 3." for lengths equal to "0" have been sent since 553917 because MathML3 suggests to always use explicit unit instead: https://www.w3.org/TR/MathML3/chapter2.html#fund.units

MathML Core aligns with CSS, so a unitless zero is acceptable. I guess we should remove the warning if it is still present.

Blocks: 1793452
No longer blocks: 157475
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: