w3c / w3c/mathml-core

Should we say that application/mathml+xml is a MIME type supported by browsers?

Open
#204 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
56
Forks
20
PR merge metrics
No merged PRs in 30d

Description

While checking Firefox reftests, I found the following one which is not passing in Chrome or WebKit:

mathml-type-supported.xhtml

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Test mime type application/mathml+xml</title>
</head>
<body>
  <object type="application/mathml+xml" data="mathml-type-supported-ref.xml"
          style="position: absolute; top: 0; left: 0; background: red;
                 width: 100px; height: 100px;"/>
</body>
</html>
mathml-type-supported-ref.xml

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mspace style="position: absolute; top: 0; left: 0; background: green;"
          width="100px" height="100px" depth="0"/>
</math>

https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-object-type says

If the type attribute is present and its value is not a type that the user agent supports, then the user agent may jump to the step below labeled fallback without fetching the content to examine its real type.

but there does not seem to be an official list of supported MIME type. Should we explicitly state that application/mathml+xml is supported? Not sure if this is still relevant now that we have MathML in HTML5.

The original Mozilla bug where this was requested is https://bugzilla.mozilla.org/show_bug.cgi?id=124709 ; this is more general than just support for the <object> attribute.

Searching in the source code:
It is in https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsExternalHelperAppService.cpp#540
It's not in https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:net/base/mime_util.cc
and not in https://searchfox.org/wubkat/source/Source/WebCore/platform/MIMETypeRegistry.cpp (webkit seems to have platform-dependent implementation)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the HTML specification section for the object type attribute and the mathml-type-supported.xhtml and mathml-type-supported-ref.xml reftests. Compare the cited MIME handling locations in Firefox's nsExternalHelperAppService.cpp, Chromium's mime_util.cc, and WebKit's MIMETypeRegistry.cpp. Done means the specification records a clear decision about application/mathml+xml support, with the reftest expectation aligned if applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, xml
Domain
documentation, web-dev
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.