Closed Bug 1603773 Opened 4 years ago Closed 4 years ago

Disable the MathML mfenced element by default in all builds

Categories

(Core :: Layout, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

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

Attachments

(1 file)

It was disabled in Nightly builds in bug 1587577.
We should disable it by default in all builds and then remove the associated code.

It seems we still unconditionally support it though, since we create a MathMLmrowFrame for it when the pref is set:
https://searchfox.org/mozilla-central/rev/923eec8d2fb8078ebc7a33a9e1ce73eac01f7446/layout/base/nsCSSFrameConstructor.cpp#4743,4767
which seems surprising to me.

Shouldn't we remove that too so that it's treated as any other unknown element when the pref is set?
(i.e. a frame will be created based on its display value)

Flags: needinfo?(fred.wang)

(In reply to Mats Palmgren (:mats) from comment #2)

It seems we still unconditionally support it though, since we create a MathMLmrowFrame for it when the pref is set:
https://searchfox.org/mozilla-central/rev/923eec8d2fb8078ebc7a33a9e1ce73eac01f7446/layout/base/nsCSSFrameConstructor.cpp#4743,4767
which seems surprising to me.

Shouldn't we remove that too so that it's treated as any other unknown element when the pref is set?
(i.e. a frame will be created based on its display value)

The idea in MathML Core is that any unknown MathML element with with "display: math" (default value for MathML elements) will be laid out the same as the mrow element. We don't really follow the core spec regarding unknown elements or display values right now, so I think this was a quick solution to make it behave like an mrow until things are sorted out.

We also still support it in the accessibility code, which might be the reason why I didn't try to remove it completely.

I would need to check things more carefully but in the meantime, I think it's reasonable to disable it in all builds if the corresponding counters are low. @Emilio, WDYT?

Flags: needinfo?(fred.wang)

The idea in MathML Core is that any unknown MathML element with with "display: math" (default value for MathML elements)

Huh? where is this display: math value specified?

(In reply to Mats Palmgren (:mats) from comment #4)

The idea in MathML Core is that any unknown MathML element with with "display: math" (default value for MathML elements)

Huh? where is this display: math value specified?

Sorry, it's a new things being proposed by the MathML CG: https://mathml-refresh.github.io/mathml-core/#new-display-math-value
We don't implement that.

Sorry, it's a new things being proposed by the MathML CG: https://mathml-refresh.github.io/mathml-core/#new-display-math-value

No worries. So have that proposal been submitted to the CSSWG yet? (I can't seem to find it at https://github.com/w3c/csswg-drafts/issues/ )

Fwiw, when I read that proposal it seems to me the new display value doesn't really explain any MathML layout. It seems that all display: math really means is "look at the element tag and do magic layout based on that". So the new value doesn't really buy us anything other than allowing authors to override the default MathML layout on MathML elements by specifying display:inline or whatever. I don't see how that helps describing existing MathML layout in CSS terms. If we want to describe the MathML box types we currently support (in layout/mathml/nsMathML*Frame*) then we basically need a new display value for each of those, right? Or is the plan to remove those frame classes in favor of new MathML specific CSS properties/values that can be used on existing CSS box types?

If I read the minutes at https://github.com/w3c/csswg-drafts/issues/3746#issuecomment-498815063 correctly there seems to be no support in the CSSWG for adding a bunch of MathML specific display values, and it seems unlikely that even just display: math as proposed is something that they'd accept. Or am I misunderstanding the situation?

Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/db57a1f9ef9c
Disable the MathML mfenced element by default in all builds.  r=emilio
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Keywords: dev-doc-needed
Keywords: site-compat

Sorry I'm late to the party, I didn't get the memo that <mfenced> was being deprecated and removed, and this is problematic for me because I use it all the time in MathML so this change broke a lot of pages of mine. Where can I find the discussion as to the decision to deprecate this element, and the W3C spec that says it is deprecated? The latest MathML spec I found is https://www.w3.org/TR/MathML3/ and this still very much has <mfenced> in it: is there a later one?

This was discussed in https://github.com/mathml-refresh/mathml/issues/2. Fred, maybe MathML3 should have a note or something?

Flags: needinfo?(fred.wang)

(In reply to David A. Madore from comment #12)

The latest MathML spec I found is https://www.w3.org/TR/MathML3/ and this still very much has <mfenced> in it: is there a later one?

The latest relevant spec these days (at least for web browser implementation) is
https://mathml-refresh.github.io/mathml-core/

And, in practice, as an author of web pages with MathML in them, this “MathML Core” spec is what I'm supposed to follow, then? Is there some guarantee that more stuff will disappear from under my feet, or some way for me to avoid this? I'd like to avoid another “scrambling to replace <mfenced> where I can because it suddenly no longer works” session if there's a way for me to do that.

(In reply to David A. Madore from comment #15)

And, in practice, as an author of web pages with MathML in them, this “MathML Core” spec is what I'm supposed to follow, then? Is there some guarantee that more stuff will disappear from under my feet, or some way for me to avoid this? I'd like to avoid another “scrambling to replace <mfenced> where I can because it suddenly no longer works” session if there's a way for me to do that.

... well, you may consider this:
"Participation is encouraged if you are in involved in publishing, authoring, or rendering math."
https://www.w3.org/community/mathml4/2019/01/24/call-for-participation-in-mathml-refresh-community-group/

Of course, you can just participate on Github without being a W3C member.

Flags: needinfo?(fred.wang)

Microsoft's One Note web app has a "to math" feature. It generates mfenced nodes for things in parentheses. With this change to firefox, the parentheses don't show up. I will have to use Chrome for the time being. I suppose the right solution is to get Microsoft to fix things on their end, but until that happens, is there a workaround?

Ah, should have guessed: Go to about:config, search for mfenced, and set mathml.mfenced_element.disabled to false. That seems to work on Firefox 75 on Fedora Linux at least.

(In reply to Garrett Mitchener from comment #17)

Microsoft's One Note web app has a "to math" feature. It generates mfenced nodes for things in parentheses. With this change to firefox, the parentheses don't show up. I will have to use Chrome for the time being. I suppose the right solution is to get Microsoft to fix things on their end, but until that happens, is there a workaround?

I guess you reported this to Microsoft. Chrome does not support mfenced and there is no plan to implement it in the current MathML implementation effort.

Flags: needinfo?(garrett.mitchener)

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

(In reply to Garrett Mitchener from comment #17)

Microsoft's One Note web app has a "to math" feature. It generates mfenced nodes for things in parentheses. With this change to firefox, the parentheses don't show up. I will have to use Chrome for the time being. I suppose the right solution is to get Microsoft to fix things on their end, but until that happens, is there a workaround?

I guess you reported this to Microsoft. Chrome does not support mfenced and there is no plan to implement it in the current MathML implementation effort.

Just posted it here: https://answers.microsoft.com/en-us/msoffice/forum/msoffice_onenote-mso_other-mso_online/onenote-math-notation-in-the-web-browser-uses/f44e454e-5e6c-452f-af0e-009d366d149b?tm=1589912746137

Flags: needinfo?(garrett.mitchener)
See Also: → 1664975
Blocks: 1791245
You need to log in before you can comment on or make changes to this bug.