Open Bug 1158831 Opened 9 years ago Updated 2 years ago

Linkify SVG IRI in the markup-view

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: pbro, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [btpp-backlog])

A few SVG attributes can use IRI values, a pointer to an external or internal resource.
For example:

<rect fill="url(#an-id)" />

Same with stroke, markerstart, markermid, markerend, href.

After bug 921102 lands, we should also linkify these attributes.
They're a bit more complex than other, simpler, URL attributes which are handled in bug 921102 because some parsing is necessary.
Indeed, the IRI could be pointing to a remote file, or a local id, also, the attribute value may or may not contain the link:

<rect fill="red" />
Depends on: 921102
Here's another example:

http://codepen.io/thebabydino/full/BNRmRE/
Search for g#vertices on the page, the group contains a set of <use xlink:href="..." /> that all point to SVG elements in the <defs> part of the SVG. Right clicking on the href should offer to select the referenced element.
Bug triage. Filter on CLIMBING SHOES
Priority: -- → P3
Whiteboard: [btpp-backlog]
For internal resources it's clear that the link should select the referenced element. Though what should happen when the URI refers to an external resource? Should it be opened in a new tab? In the same one? Can/should the DevTools be opened? And can/should the referenced element be selected?

Sebastian
Flags: needinfo?(pbrosset)
(In reply to Sebastian Zartner [:sebo] from comment #5)
> For internal resources it's clear that the link should select the referenced element.
Agreed.
> Though what should happen when the URI refers to an external
> resource? Should it be opened in a new tab? In the same one? Can/should the
> DevTools be opened? And can/should the referenced element be selected?
I would vote for it to open the resource in a new browser tab, without devtools opened. Just like we someetimes do for opening images or scripts in other tabs.
Flags: needinfo?(pbrosset)
Product: Firefox → DevTools
Severity: normal → enhancement

Karl, I think I may have made this block bug 1493094 by mistake. Can you confirm? Is this something that would help your team?

Flags: needinfo?(kdubost)

it's a nice to have, but not essential. So I don't think it should block bug 1493094
Thanks for asking Patrick.

Flags: needinfo?(kdubost)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.