Bug 81122 - SVG anchor on use fails
Summary: SVG anchor on use fails
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Stephen Chenney
URL: http://www.thesokolows.com/colorresea...
Depends on:
Reported: 2012-03-14 09:10 PDT by Stephen Chenney
Modified: 2012-04-20 09:11 PDT (History)
3 users (show)

See Also:

Patch (2.26 KB, patch)
2012-04-18 13:00 PDT, Stephen Chenney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Chenney 2012-03-14 09:10:22 PDT

Chrome Version       : 18.0.1025.56 beta
URLs (if applicable) : http://www.thesokolows.com/colorresearch/pedigrees/AARON_OF_QUIETUDE.xhtml

Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5: FAIL
  Firefox 4.x: OK
       IE 7/8/9: NA

What steps will reproduce the problem?
1. From the example URL, click on the little eye symbol

What is the expected result?
Navigate to a picture of the horse (follow the link in the <a> element).

What happens instead?
The link in the containing element is followed.

To aid in producing a reduction, the example URL contains this, where the "#male" bbox contains the "#eye" bbox:
<use xlink:href="#couple" x="11" y="14" />
<a xlink:href="ADRIAN_ASHMORE.xhtml"> <use xlink:href= "#male" class="maleStyle  nonflaxenStyle  " x="11" y="14" /></a>
<a xlink:href="ADRIAN_ASHMORE.xhtml"> <text font-size=".7" font-family="monospace" x="11.5" y="14.8" >ADRIAN ASHMORE</text></a>

<text font-size=".6" font-family="monospace" x="15" y="15.6" >12877 -</text>

<text font-size=".7" font-family="monospace" x="11.3" y="15.6" >CH</text>

<a xlink:href="http://www.morganhorse.com/upload/photos/3922AdrianAshmoreNew.jpg" > <use xlink:href="#eye" x="13" y="14.9" /></a>
Comment 1 Nikolas Zimmermann 2012-03-14 09:43:58 PDT
I think the reduction is confusing. Don't you mean
<a xlink:href="outer.svg">Click <a xlink:href="inner.svg">Here</a></a>
that we always navigate to outer.svg even when clicking on "Here"?
Comment 2 Stephen Chenney 2012-03-14 10:15:10 PDT
Yeah, my reduction is not really a reduction. Note that your anchor inside anchor is in fact illegal according to the spec.

This might work, but I haven't tried yet. Still working through over 100 WebKit SVG bugs in crbug figuring out which ones are not yet in Bugzilla.

<svg ...>
    <rect name="inner" x="10" y="10" width="20" height="20"/>
  <a href="outerHref"><rect x="5" y="5" width="30" height="30"/></a>
  <a href="innerHref"><use xlink:href="#inner"/></a>

When you click at 15,15 you will apparently go to outerHref. Regardless, there is some bug that the referenced site reveals.
Comment 3 Rob Buis 2012-04-17 14:04:01 PDT
Is this still a problem in trunk?
Comment 4 Stephen Chenney 2012-04-18 12:42:13 PDT
This does indeed seem to have been fixed. Both the original bug report test case and a layout test I constructed both work as expected in Chrome 19.0.1084.24 beta.

I think I'll upload the test anyway, just for future regression testing.
Comment 5 Stephen Chenney 2012-04-18 13:00:35 PDT
Created attachment 137747 [details]
Comment 6 Rob Buis 2012-04-19 17:08:48 PDT
Comment on attachment 137747 [details]

Looks good.
Comment 7 Stephen Chenney 2012-04-20 09:11:06 PDT
Comment on attachment 137747 [details]

Clearing flags on attachment: 137747

Committed r114750: <http://trac.webkit.org/changeset/114750>
Comment 8 Stephen Chenney 2012-04-20 09:11:11 PDT
All reviewed patches have been landed.  Closing bug.