Bug 51437 - Add a way to get a web archive in WebKit2
Summary: Add a way to get a web archive in WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 17:48 PST by Darin Adler
Modified: 2010-12-22 12:23 PST (History)
0 users

See Also:


Attachments
Patch (11.14 KB, patch)
2010-12-21 17:51 PST, Darin Adler
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2010-12-21 17:48:39 PST
Add a way to get a web archive in WebKit2
Comment 1 Darin Adler 2010-12-21 17:51:53 PST
Created attachment 77173 [details]
Patch
Comment 2 Brady Eidson 2010-12-21 18:11:27 PST
Comment on attachment 77173 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=77173&action=review

> WebKit2/ChangeLog:15
> +        (WebKit::WebPageProxy::getWebArchiveForFrame): Added.

Not going to r- based on this, but consider it - I slightly prefer "getWebArchiveOfFrame" instead of "getWebArchiveForFrame"

Same comment applies throughout

> WebKit2/WebProcess/WebPage/WebPage.cpp:951
> +

It seems weird that every platform has this family of functionality even if they don't support our concept of a "WebArchive," and that makes this silent "never really do anything here" behavior puzzling to me for non-Mac/Win builds.

I don't know a good solution for this without a whole-lot-more #ifdef'ing
Comment 3 Darin Adler 2010-12-22 11:08:35 PST
(In reply to comment #2)
> I slightly prefer "getWebArchiveOfFrame" instead of "getWebArchiveForFrame"

I talked to Sam and we decided to do it your way.

> It seems weird that every platform has this family of functionality even if they don't support our concept of a "WebArchive," and that makes this silent "never really do anything here" behavior puzzling to me for non-Mac/Win builds.

I thought it through, and I think this is probably the best tradeoff. I don’t think more ifdefs would be helpful. Returning an empty archive on platforms that don’t support archives seems OK to me, but you could argue that we need to return an error instead or omit the function entirely.
Comment 4 Darin Adler 2010-12-22 12:23:11 PST
Committed r74494: <http://trac.webkit.org/changeset/74494>