The default bug view has changed. See this FAQ.

# MathML is not displayed correctly inside link and underline tags

NEW
Unassigned

Core
MathML
NEW
6 years ago
10 months ago

Trunk
---
All
Other
Points:
---

## Attachments

### (2 attachments)

 72.39 KB, image/png Details 14.04 KB, image/png Details
(Reporter)

### Description

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:

Visit
https://eyeasme.com/Joe/MathML/MathML_text_decoration_bug
and
https://bug504324.bugzilla.mozilla.org/attachment.cgi?id=502338

Actual results:

pages do not render correctly

Expected results:

pages should render correctly

### Updated

6 years ago
Component: General → MathML
Product: Firefox → Core
QA Contact: general → mathml

### Comment 1

6 years ago
More precise description is available in bug 504324.
(Reporter)

### Comment 2

6 years ago
Created attachment 542434 [details]
screen shot of https://eyeasme.com/Joe/MathML/MathML_text_decoration_bug

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

### Comment 3

6 years ago
Created attachment 542435 [details]
image of https://bug504324.bugzilla.mozilla.org/attachment.cgi?id=502338

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

### Updated

6 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

### 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.

### Comment 5

5 years ago
(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 [itex] 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

http://www.mozilla.org/projects/mathml/demo/texvsmml.html

demonstrates how to choose alternate style. I hope that can help you.

### Comment 6

5 years ago
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.

### Comment 7

11 months ago
NIST people working on the formula search engine have this problem (<a> is generated with LaTeXML as I mentioned in comment 6).

http://en.formulasearchengine.com/wiki/Fourier_series#Example_1:_a_simple_Fourier_series

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

### Comment 8

10 months ago
https://hg.mozilla.org/mozilla-central/annotate/16663eb3dcfa759f25b5e27b101bc79270c156f2/layout/generic/nsBlockFrame.cpp#l845

<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.

https://hg.mozilla.org/mozilla-central/annotate/16663eb3dcfa759f25b5e27b101bc79270c156f2/layout/mathml/mathml.css#l68

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.