[Webkit-unassigned] [Bug 7211] Support save as "Web page, complete" in Firefox format

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 25 09:51:51 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=7211





------- Comment #3 from ddkilzer at webkit.org  2008-06-25 09:51 PDT -------
(In reply to comment #2)
> Did someone already try to do this?

No, not that I'm aware of.

> Do you have implementation suggestions?

Basically the code will need to walk (or somehow traverse) the HTML DOM looking
for references to external resources (like images, CSS files, JavaScript files,
etc.) and (1) modify the references to point to (new) local copies that will be
saved on disk and (2) queue the resources for later saving to disk.  And this
will have to be done "recursively" for all resources since the outer HTML file
could reference an <iframe>, which could reference another <iframe>, etc.

Note that you'll have to walk the CSS object model (CSS OM) as well since
references such as other CSS files and images may be included in CSS source. 
(Firefox 2.0.0.x currently doesn't do this, so you don't truly get a complete
web page with this feature.  Haven't tried Firefox 3 yet.)

Finally, I'd use Firefox 2/3 as a guide for how to structure the output (it
saves the top level HTML file with a "_files" directory beside it, but any
subresources that are HTML pages use a "_data" suffix for their corresponding
directory), and then improve on the design as needed.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list