The default bug view has changed. See this FAQ.

MathML is not displayed correctly inside link and underline tags




6 years ago
10 months ago


(Reporter: Joe Java, Unassigned)



Firefox Tracking Flags

(Not tracked)



(2 attachments)



6 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:7.0a1) Gecko/20110627 Firefox/7.0a1
Build ID: 20110627030739

Steps to reproduce:


Actual results:

pages do not render correctly

Expected results:

pages should render correctly
Component: General → MathML
Product: Firefox → Core
QA Contact: general → mathml
More precise description is available in bug 504324.

Comment 2

6 years ago
Created attachment 542434 [details]
screen shot of

Notice that the second column is displayed incorrectly when compared to the first and third columns.

Comment 3

6 years ago
Created attachment 542435 [details]
image of

Notice lines 1 and 2 are incorrect.  
This attachment and the first attachment were made with 
nightly build 7.0a1 2011-06-27
Ever confirmed: true

Comment 4

5 years ago
Any progress on this bug?  I am getting ready to update some MathML pages and want to update the CSS used.  Firefox 13 changes the look and feel of the resulting MathML, due to the MathJax fonts being made default.
(In reply to Joe Java from comment #4)
> Any progress on this bug?

Apparently no, otherwise someone would have taken the bug and/or posted something here. Maybe it's just a matter of setting the right "underline" flag in the C++ code, but unless someones tries to debug the code or ask the appropriate programmers where to find it, this bug is not likely to be fixed. As indicated in Bugzilla's etiquette - rule 1.2, only people for which the bug is important have the obligation to fix it and that's even more true for the MathML project, where essentially only volunteers submit patches. 

Personally, I find this bug less important than other MathML bugs because it happens only when someone uses a <a> around a math or intentionally underlines the <math> element. The MathML's 3 href attribute is more appropriate for the former and I don't think the latter really happen in practice. That said, that's just my opinion, if this bug is critical for you then your patches are welcome.

> I am getting ready to update some MathML pages
> and want to update the CSS used.  Firefox 13 changes the look and feel of
> the resulting MathML, due to the MathJax fonts being made default.

I'm not sure how this comment relates to the present bug, but the torture test page

demonstrates how to choose alternate style. I hope that can help you.
There have recently been discussion in MathJax and Mozilla MathML mailing lists about how to restore the "text-decoration: underline;" of MathML nodes with a href attribute.

Also, I finally found a real-life use case for the present bug, using LaTeXML: If you use mathematical formulas inside section titles of your document then they are copied to the table of contents inside <a> links.

Probably, we should find another way to fix bug 504324 and bug 667567 than just removing the text-decoration. Instead, we should really understand where these gaps come from.
NIST people working on the formula search engine have this problem (<a> is generated with LaTeXML as I mentioned in comment 6).

@James: I'm cc'ing in case you have time to debug this.

<a href> case
StyleContext()->HasTextDecorationLines() is true, so metrics are calculated using GetVisualOverflowRect()

<math href case>
StyleContext()->HasTextDecorationLines() is false, so metrics are calculated using ComputeSimpleTightBounds(DrawTarget)

The <a href> case has NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE being set, despite being turned off in the MathML CSS.

I'll try to work out why this is the case.
You need to log in before you can comment on or make changes to this bug.