Bug 15280 - SVG Subresources will not be saved when creating WebArchives
Summary: SVG Subresources will not be saved when creating WebArchives
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P3 Normal
Assignee: Nobody
Depends on:
Reported: 2007-09-25 12:32 PDT by Eric Seidel (no email)
Modified: 2007-10-01 22:45 PDT (History)
1 user (show)

See Also:

the fix (12.74 KB, patch)
2007-09-29 09:09 PDT, Eric Seidel (no email)
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-09-25 12:32:23 PDT
SVG Subresources will not be saved when creating WebArchives

SVG elements (actually the Obj-C DOM wrappers for the elements) do not implement the _subresources, internal method to expose the urls of their subresources.  I had to implement this for SVGImageElement, but I have not done so for any of the other SVG Elements.  Mostly because the first two other elements I looked at (foreignObject and script) did not expose their xlink:href attribute via a binding method in their idls.  So there is some piping which would need to be put in place in order to get the actual href values from each of these SVG Elements and made available to the _subresources call.


for examples of the _subresources code necessary.

for a list of elements which use the xlink:href property (as well as any other property which might make reference to an external file).
Comment 1 Eric Seidel (no email) 2007-09-29 09:09:37 PDT
Created attachment 16455 [details]
the fix
Comment 2 Alexey Proskuryakov 2007-09-29 09:36:04 PDT
Comment on attachment 16455 [details]
the fix

Comment 3 Eric Seidel (no email) 2007-09-29 09:39:50 PDT
I should note that this patch does not implement *all* of the _subresources methods that SVG might ever need.  If we ever support external references with <use> or <tref>, etc. those will all need _subresources methods in order to be correctly archived.  But I believe all of the SVGElement subclasses which do support external references now have proper _subresources methods.

Landed on feature-branch as r25809.
Comment 4 Oliver Hunt 2007-10-01 19:17:25 PDT
This was skipped when rebasing and will need to be updated for the new featurebranch
Comment 5 Eric Seidel (no email) 2007-10-01 22:45:46 PDT
relanded (same patch) as r25908.