Bug 51437

Summary: Add a way to get a web archive in WebKit2
Product: WebKit Reporter: Darin Adler <darin>
Component: WebKit2Assignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch beidson: review+

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>