UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; enUS; rv:1.9.1) Gecko/20090624 Firefox/3.5 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; enUS; rv:1.9.1) Gecko/20090624 Firefox/3.5 Hyperlinked MathML equations should not have their appearance altered (other than color changes) when linked. (i.e the CSS code textdecoration: none should be the default for hyperlinked MathML formulas). I have include and image and webpage that shows that MathML formulas that are hyperlinked are incorrectly displayed, unless CSS "textdecoration" is set to "none" Reproducible: Always Steps to Reproduce: 1. go to https://eyeasme.com/Joe/MathML/MathML_text_decoration_bug 2. see the bug 3. Actual Results: When a MathML formula when hyperlinked should not change its appearance (other than color) Expected Results: When a Hyperlinked MathML formula has CSS property "textdecoration" property set to "none" it displays correctly, otherwise it does not. This appears to be a simple bug to fix. Just set the default CSS for hyperlinked MathML equations to "textdecoration: none"
Created attachment 388709 [details] here is an image of the problem Attached is an image that clearly shows the problem. MathML formulas should not change their (noncolor) appearance when hyperlinked.
Updated•8 years ago

(Assignee)  
Comment 2•8 years ago


Created attachment 407731 [details]
Testcase
(Assignee)  
Comment 3•8 years ago


Created attachment 407732 [details] Screenshot of the testcase (Firefox)
(Assignee)  
Comment 4•8 years ago


Created attachment 407733 [details] Screenshot of the testcase (Amaya)
(Assignee)  
Comment 5•8 years ago


Just setting textdecoration: none on the <math/> element does not seem to work. Note the behavior of Amaya: "textdecoration: underline" is also inherited, but the workaround "textdecoration: none" works. Also, note that using xlink avoids this problem since no CSS is added (but XLink is currently broken, see bug 427990).
In regards to Comments 2  5. I have modified your example to more clearly show how the CSS property 'textdecoration' changes the appearence of hyperlinked equations. https://eyeasme.com/Joe/MathML/test_for_bug504324.html I have attached an image of the page.
Created attachment 407766 [details] image of webpage https://eyeasme.com/Joe/MathML/test_for_bug504324.html image of page https://eyeasme.com/Joe/MathML/test_for_bug504324.html using firefox 3.5.3 on OS X 10.5.8
(Assignee)  
Comment 8•8 years ago


Created attachment 407786 [details]
<a/> with text + MathML inside
I don't think setting textdecoration to false at the <a/> level is an appropriate fix because <math/> may have siblings that should be underlined. Setting textdecoration to false at the <math/> level would be OK (even if I think it's better to underline the whole formula) but it just seems not to work.
MathML equations that are hyperlinked should not have their "size" changed or be underlined (since an equation might use underlining as a symbolic representation of a mathematical concept). Color changes to represent hyperlinking would be OK, since CSS allows for the control of hyperlinking colors.
(Assignee)  
Comment 10•8 years ago


(In reply to comment #9) > MathML equations that are hyperlinked should not have their "size" changed or > be underlined (since an equation might use underlining as a symbolic > representation of a mathematical concept). Color changes to represent > hyperlinking would be OK, since CSS allows for the control of hyperlinking > colors. I don't think underlining a formula is really problematic and actually I find it more consistent with the surrounding HTML. In attachment 407786 [details], I would find strange to have the beginning of the link "the formula" and the end "inside a <a/>" underlined but not the formula "sqrt(x^2  1)". Anyway, my point was that the fix you suggest (setting textdecoration:false to the <a/>) is bad, because the <math/> element changes the style of its parent element. What could be OK is setting textdecoration:false to the <math/> element, but this does not work. I think the right thing to do is to find why there are additional spaces when the formula is in a link. textdecoration on the parent <a/> probably change other rendering parameters and I would be interested to know what is exactly happening.
(Reporter)  
Comment 11•8 years ago


(In reply to comment #10) > (In reply to comment #9) > > MathML equations that are hyperlinked should not have their "size" changed or > > be underlined (since an equation might use underlining as a symbolic > > representation of a mathematical concept). Color changes to represent > > hyperlinking would be OK, since CSS allows for the control of hyperlinking > > colors. > > I don't think underlining a formula is really problematic and actually I find > it more consistent with the surrounding HTML. In attachment 407786 [details], I would > find strange to have the beginning of the link "the formula" and the end > "inside a <a/>" underlined but not the formula "sqrt(x^2  1)". > sigh.... OK... Underlining is an acceptable mathematical symbol. See https://eyeasme.com/Joe/MathML/MathML_browser_test The "De Morgan's law" example. There overlining represents complementation. In the same way often underlining can be used to represent a attribute. For example, what is the value of "sin(1.4)" The answer depends on if the angle is in radians or degrees, sometimes to make life easier all degree angles are underlined. In teaching linear algebra sometimes it helps the student to underline variables that are one dimensional, underline twice two dimensional variables and not underlining scalars. If lecture notes are htmlized and variables are hyperlinked, then when a student prints out the htmlized lecture notes everything will be screwed up by the added underlining done by the browser. MathML equations/formulas should not be changed in shape or have additional markings made to them by being hyperlinked. They should not be bolded, underlined, overlined, dashed, etc., when hyperlinked They CAN have their color change and the cursor can change shape when over the equation. I understand your desire be uniform with the surrounding HTML, but MathML is NOT HTML. Mathematical equations are in a class all there own... like images, SVG, applets, etc. > Anyway, my point was that the fix you suggest (setting textdecoration:false to > the <a/>) is bad, because the <math/> element changes the style of its parent > element. What could be OK is setting textdecoration:false to the <math/> > element, but this does not work. > > I think the right thing to do is to find why there are additional spaces when > the formula is in a link. textdecoration on the parent <a/> probably change > other rendering parameters and I would be interested to know what is exactly > happening. I agree that my fix is not correct for all cases. I would like the final solution to end up producing hyperlinked equations that look similar the third example in https://eyeasme.com/Joe/MathML/test_for_bug504324.html There the MathML equation is marked as hyperlinked by having ONLY its color changed (and the mouse changes shape over it to show a hyperlink).
(Assignee)  
Comment 12•7 years ago


Created attachment 502338 [details]
testcase
updated testcase
(Assignee)  
Comment 13•7 years ago


Created attachment 502339 [details] [diff] [review] Patch for xlink and mathml 3 href This patch fixes the cases 2 and 3 (xlink and MathML 3 href).
(Assignee)  
Updated•7 years ago

Two things: * wouldn't it be better to use :link instead of attribute selectors? * why !important? shouldn't authors be able to override this?
So I think you just want :mozanylink { textdecoration:none; }
If that works! I'm not sure how the precedence will work out between mathml.css and the rules inserted by PresShell::SetPrefLinkRules.
If that doesn't work you might need to insert a MathML rule into PresShell::SetPrefLinkRules (or just make the mathml.css rule !important).
(Assignee)  
Comment 18•7 years ago


Thanks for the hints. Yes, the patch uses !important because it doesn't work otherwise. I can also use :mozanylink { textdecoration:none; !important; }, which gives the same result.
To extend slightly the issue of this bug, note that the rule "textdecoration: underline;" confuses the rendering of formulas (it adds unexpected spaces under each MathML frames). Moreover, I think the appropriate markup for underlying a MathML fragment is rather <menclose notation="bottom"> ... </menclose> instead of CSS textdecoration. Hence I guess we could actually set textdecoration=none for any MathML element?
However, putting "textdecoration: none !important;" in mathml.css does not work for the toplevel <math/> element (see tests 1 and 2 of attachment 502338 [details]). Is there a simple way to make this work?
I don't know why that wouldn't work.
(Assignee)  
Comment 20•7 years ago


Created attachment 505534 [details] [diff] [review] Patch for xlink and mathml 3 href (V2)
(Assignee)  
Updated•6 years ago

(Reporter)  
Comment 21•6 years ago


Concerning underlining hyperlinked MathML: see http://lists.w3.org/Archives/Public/wwwstyle/2010Aug/0334.html specifically:  User agents must not render these text decorations on content that is  not text. For example, images and inline blocks must not be underlined. if MathML is considered "not text" then it should not be underlined.
Comment 22•6 years ago


(In reply to comment #21) > Concerning underlining hyperlinked MathML: see > > http://lists.w3.org/Archives/Public/wwwstyle/2010Aug/0334.html > > specifically: > >  User agents must not render these text decorations on content that is >  not text. For example, images and inline blocks must not be underlined. > > if MathML is considered "not text" then it should not be underlined. MathML is actually a special case in that links can really never be underlined, as doing so alters the formulas by making it look like you are doing division where you are not.
Comment 23•6 years ago


Pushed to inbound along with bug 427990: http://hg.mozilla.org/integration/mozillainbound/rev/6b26a5b08522
Comment 24•6 years ago


http://hg.mozilla.org/mozillacentral/rev/6b26a5b08522
(Assignee)  
Comment 25•6 years ago


The patch doesn't fix the bug when the link is done that way: <a href=""><math>...</math></a>. However, it does fix cases such as <math href="">...</math>, <math>...<mrow href="">...</mrow> ...</math> (and similarly for xlink:href) which are the appropriate way to do links in MathML.
(Reporter)  
Comment 26•6 years ago


I have updated the reference page to HTML5 https://eyeasme.com/Joe/MathML/MathML_text_decoration_bug The problem is that I place the MathML code into my HTML5 pages with PHP includes. MathML is very verbose, it is easier to work with several smaller files automatically included into one large file, rather than one huge file. It is easy to create the MathML code and them just use the PHP include command to embed the code within any link tag 'a'. As noted in Comment #25 and shown in the reference page this does not work. Should a new bug be filed for the case of a math tag within link tab or this bug reopened?
(Reporter)  
Comment 27•6 years ago


Also note that once a linked MathML formula has been visited the blue "never been visited" and purple "visited" link colors get screwed up and only part of the formula has the purple "been visited" color. Should this be a new bug or a continuation of this bug?
(Assignee)  
Comment 28•6 years ago


> Should a new bug be filed for the case of a math tag within > link tab or this bug reopened? Please open a separate bug for that. Also, note that it is not specific to links, for example it also happens with <u> (see attachment 502338 [details]).
(Assignee)  
Comment 29•6 years ago


(In reply to comment #27) > Also note that once a linked MathML formula has been visited > the blue "never been visited" and purple "visited" link colors > get screwed up and only part of the formula has the purple > "been visited" color. > > Should this be a new bug or a continuation of this bug? A new bug, please. I think it only happens with <mo>'s, which are drawn differently because of there stretchiness property.
(Assignee)  
Updated•6 years ago

Description
•