Closed Bug 559042 Opened 15 years ago Closed 13 years ago

xlink:href on mfrac links the whole subtree, not just the fraction stroke

Categories

(Core :: MathML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: langec, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100409 Gentoo Firefox/3.6.3
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100409 Gentoo Firefox/3.6.3

I use XLinks in order to link Presentation MathML symbols to their definitions in OpenMath Content Dictionaries.  I will attach a sample document.  Normal operators can easily linked using e.g. <mo xlink:href="http://www.openmath.org/cd/arith1#plus>+</mo>.  But for mfrac this does not work.  When I add an XLink to it, it links the mfrac, but not _just_ the mfrac, but also all of its children.  So there is no possibility of making operators that occur inside the fraction link somewhere else.

The behavior that the parent always wins when there are nested links may sound reasonable, and it may be against best practices to nest links at all, but when I want to link mfrac to http://www.openmath.org/cd/arith1#divide but operators inside the mfrac to some other target, I am forced to nest links, because there is no <mo>-like symbol for mfrac.

So what I would like to suggest is that an xlink:href on mfrac only affects the fraction stroke, not the whole fraction expression including all children.

This might be a general challenge for MathML; therefore I will also discuss this issue on W3C's MathML list.

Reproducible: Always

Steps to Reproduce:
1. Open the attached document.
2. Middle-click (assuming Linux) the "plus" in a+b.

Actual Results:  
Leads to "divide"

Expected Results:  
Should lead to "plus" (as the XLink on the other + operator does)

Here I report this for XLink, but as soon as bug 534968 will be addressed, the same problem may hold for @href.
Here is the related discussion on the MathML list: http://lists.w3.org/Archives/Public/www-math/2010Apr/thread.html#msg13
Hi Christoph,

I don't think your proposal will work in general (for example the bar of mfrac can have linethickness=0). Also, I think it would be difficult to implement in Mozilla: the bar is not a real C++ object, it only "lives" when we draw it so we can really catch event from it. What you would need is maybe a UI that proposes all the possible links of the MathML elements you click on.
Your test case works for me. Probably bug 427990 fixes the issue.
Can you please try with Aurora:

http://www.mozilla.com/en-US/firefox/channel/
It seems to me that now the child element always wins.
Christoph, do you still have the issue?
Whiteboard: [closeme 2012-05-05]
Thanks, Fréd, with Firefox 10 I am now able to click on the linked fraction stroke.  Not always though.  In my test case in comment 1 above you still have to take care not to accidentally select the "plus" in the numerator.  If you select the link without traversing it (e.g. by hitting TAB several times) you will see that it is much larger than the plus sign; it even extends below the fraction stroke.  But on the other hand a smaller link would make the plus sign hard to focus, so altogether I think the current solution is sufficient.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Whiteboard: [closeme 2012-05-05]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: