Allow scripts to detect MathML-enabled builds

RESOLVED WONTFIX

Status

()

Core
MathML
RESOLVED WONTFIX
16 years ago
7 years ago

People

(Reporter: rbs, Unassigned)

Tracking

(Depends on: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
Filing this bug for the record. There was thread on n.p.m.mathml asking how 
scripts can detect MathML-enabled builds. The thread is: 
http://groups.google.com/groups?hl=en&th=6ceed7fc31a0262e&rnum=1

When MathML becomes an integral part of Mozilla, it is conceivable that this
might still be useful since some embedders may choose to disable it.

Following the code done in nsGenericElement::InternalIsSupported(), the 
fix for this could simply be to add recognition of something along the lines:
DOMImplementation.hasFeatures(feature = "MathML", version = "" | 1.0 | 2.0).

This is in line with the spec:
http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605/core.html#ID-102161490
nsGenericElement::InternalIsSupported() doesn't seem like the right place to put
this, that method should be for *DOM* features only, there's no MathML DOM is
there? I'm happy to expose this *somewhere* in the DOM, but I'm not sure the DOM
feature query mechanism is the right place for it.
(Reporter)

Comment 2

16 years ago
There is now a MathML DOM (in the latest V. 2.0):
http://www.w3.org/TR/MathML2/appendixd.html

There is a gray area in distinguishing between the MathML-DOM (lately introduced
in v2.0) and MathML-layout (which is all that was in MathML 1.0 that we aim at
for now). I have been wondering myself about the suitability of
DOMImplementation.hasFeatures() for both cases. The DOM as known today wasn't
yet there when MathML 1.0 was sitting there as an unimplemented recommendation
in mainstream browsers.

Comment 3

16 years ago
I think this would be nice to have for 1.0, because a significant number of
builds from that branch will have mathml enabled.
Keywords: mozilla1.0
(Reporter)

Comment 4

15 years ago
mozilla.org itself is shipping builds that may or may not be MathML-enabled (Mac
vs Others).

jst, did you got a definite idea where the detection should go?
rbs: Do we support the MathML DOM?
(Reporter)

Comment 6

15 years ago
No, that's why it is uncertain how to fix this bug.
(Note that the proposed MathML DOM cited in comment #2 is non-normative) 
(Reporter)

Comment 7

14 years ago
I had this idea of leveraging on document.load()... but curiously, the security
manager won't let me use the data: protocol. Will attatch the test I did.
(Reporter)

Comment 8

14 years ago
Created attachment 120262 [details]
testcase to check if MathML is enabled

The idea is to create a XML document and load some of those weird MathML
entities.
And if there is no parsing error during load, conclude that MathML is there.
(Reporter)

Comment 9

14 years ago
I am wondering if there are security risks in doing:
  document.load("data:text/xml, some-weird-entities-from-the-MathML-DTD")
if the security manager allowed the data: protocol, it have been a good enough
fix for the time being.
(Reporter)

Comment 10

14 years ago
Filed bug 201903 about the fact that document.load("data: protocol) doesn't
work. With that, this bug could have an interesting standard-compliant solution.
Depends on: 201903
QA Contact: ian → mathml
Assignee: rbs → nobody
All MoCo builds now have MathML enabled, right? Would it be appropriate to WONTFIX this now?
(In reply to comment #11)
> All MoCo builds now have MathML enabled, right? Would it be appropriate to
> WONTFIX this now?

Yes, I agree. Moreover if we consider other browsers, Opera supports MathML and implementation is underway for WebKit (Internet Explorer still requires a plugin though). I suggest closing this bug if nobody complains.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.