Bug 16268 - target="_top" in embedded SVG fails to replace parent content
Summary: target="_top" in embedded SVG fails to replace parent content
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.w3.org/2004/CDF/TestSuite/...
Keywords: NeedsReduction
Depends on:
Blocks: 15836
  Show dependency treegraph
 
Reported: 2007-12-03 03:22 PST by Eric Seidel (no email)
Modified: 2012-06-20 06:07 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-12-03 03:22:55 PST
target="_top" in embedded SVG fails to replace parent content

I'm not sure if this is an SVG issue or a more general link/object issue.

http://www.w3.org/2004/CDF/TestSuite/WICD_CDR_WP1/wicdmatrix.xhtml?implemented2
Shows how the test authors expected target="_top" to work.
Comment 1 Eric Seidel (no email) 2007-12-04 13:53:15 PST
This seems to be an IE thing:
http://msdn2.microsoft.com/en-us/library/ms534659.aspx
Comment 2 Eric Seidel (no email) 2007-12-04 13:53:38 PST
Frame* FrameTree::find(const AtomicString& name) const
seems to correctly check for _top however.
Comment 3 Eric Seidel (no email) 2007-12-04 18:42:20 PST
Ok.  Our problem here is in SVGAElement::defaultEventHandler:

        String target = getAttribute(SVGNames::targetAttr);
        String xlinktarget = getAttribute(XLinkNames::showAttr);
        if (e && e->button() == MiddleButton)
            target = "_blank";
        else if (target.isEmpty()) // if target is empty, default to "_self" or use xlink:target if set
            target = (xlinktarget == "new") ? "_blank" : "_self";

That might be the correct behavior for xlink:show, but that's not right for :target, which should behave like html's :target attribute and correctly support _top, etc.
Comment 4 Eric Seidel (no email) 2007-12-15 03:03:19 PST
This will be really easy to fix if we just make a test of all the various xlink:show, xlink:target and null:target values.
Comment 5 Rob Buis 2012-06-09 16:06:02 PDT
The target="_top" part of this test seems to work fine these days.
Comment 6 Eric Seidel (no email) 2012-06-20 06:07:10 PDT
Yes, I would be shocked if this didn't work today.