Ctrl + Click on SVG/MathML links does not open pages in a new tab

VERIFIED FIXED in Firefox 7

Status

()

Firefox
General
VERIFIED FIXED
6 years ago
5 years ago

People

(Reporter: fredw, Assigned: mak)

Tracking

(Depends on: 1 bug, {regression})

Trunk
Firefox 7
regression
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-places])

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 541930 [details]
testcase

The testcase contains various kinds of links. Using Ctrl + Click on HTML links open pages in a new tab. However, this does not work for MathML/SVG links.
The code that handles this isn't part of the core; it's part of the Firefox UI.
Component: General → Tabbed Browser
Product: Core → Firefox
QA Contact: general → tabbed.browser
In particular, see |function contentAreaClick| in browser/base/content/browser.js

Presumably hrefAndLinkNodeForClickEvent is failing here?  In particular, it doesn't seem to stop when it finds an XLink.   Looks like the changes in bug 549340 lost realHref and just completely broke this code for XLinks....
Blocks: 549340
Keywords: regression

Updated

6 years ago
Component: Tabbed Browser → General
QA Contact: tabbed.browser → general
looks like my regression, taking.

Yes it's possibly a bug in the while (node) loop, next iteration may overwrite href.
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Flags: in-testsuite?
OS: Linux → All
Hardware: x86_64 → All
Created attachment 542702 [details] [diff] [review]
patch v1.0

As thought, the loop was the culprit.
I added all the examples in the testcase attached to the test for contentAreaClick, and made subtests being able to run on multiple targets.
Attachment #542702 - Flags: review?(gavin.sharp)
Comment on attachment 542702 [details] [diff] [review]
patch v1.0

The old code found the outermost element with a valid xlink href, seems like we'd want to keep that behavior (rather than returning the innermost, as this patch does).
Attachment #542702 - Flags: review?(gavin.sharp) → review-
You want the innermost.  Since that code went away Gecko's link handling has changed to take the innermost link when clicking on nested links.
Oh, I thought the transition went the opposite way for some reason.
Attachment #542702 - Flags: review- → review?(gavin.sharp)
I can verify that the patch here, not only fixes the Ctrl-click issue for links in the testcases in this bug, but also the additional ones in bug 427990.

The 29 Jun Windows and Linux builds available at http://www.wg9s.com/mozilla/firefox/ do/will include this patch.
Attachment #542702 - Flags: review?(gavin.sharp) → review+
I'm going to remove the subtest for mathhref from the test because we are not yet supporting that.
To clarify, MathML 3 allows to add a href attribute to any MathML element, till now we supported XLinks on MathML but not a direct href attribute. This is not a regression, has been fixed just some days ago in central and contentAreaClick never handled it.
I have a patch for that, but being completely unrelated to this regression I'm going to file a bug apart and move the subtest there.
I filed bug 668618 to add support for MathML 3 href links.
Pushed with other stuff to bake, will merge as soon as I have a green run.
http://hg.mozilla.org/projects/places/rev/bf475efe290d
subtest removal: http://hg.mozilla.org/projects/places/rev/b64f604824b9
Whiteboard: [fixed-in-places]
http://hg.mozilla.org/mozilla-central/rev/bf475efe290d
http://hg.mozilla.org/mozilla-central/rev/b64f604824b9
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7
Flags: in-testsuite? → in-testsuite+

Comment 13

6 years ago
Setting resolution to Verified Fixed on Mozilla/5.0 (Windows NT 6.1; rv:7.0a2) Gecko/20110706 Firefox/7.0a2
Status: RESOLVED → VERIFIED

Updated

5 years ago
Depends on: 847895
You need to log in before you can comment on or make changes to this bug.