Bug 55442

Summary: webarchives don't contain subframe content
Product: WebKit Reporter: Alice Liu <alice.barraclough>
Component: WebKit2Assignee: Alice Liu <alice.barraclough>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch barraclough: review+

Description Alice Liu 2011-02-28 19:27:04 PST
WebPage::getWebArchiveOfFrame doesn't seem to generate any content for subframes in the resulting webarchive. 

This is because we're calling the wrong LegacyWebArchive::create() function (there are 7).  We're calling the one that takes a Frame* whereas we should be calling the one that takes a Node*.  Doing so will match old WebKit behaviour in -[DOMNode(WebDOMNodeOperations) webArchive] 

steps to repro: 
1) create a webarchive for your facebook.com (logged in) homepage. 

<rdar://problem/8994125>
Comment 1 Alice Liu 2011-02-28 19:32:11 PST
Created attachment 84175 [details]
patch

Brady Eidson (beidson) has approved this change in-person.
Comment 2 Gavin Barraclough 2011-02-28 19:39:27 PST
Comment on attachment 84175 [details]
patch

r+ since this changes behaviour to match webkit1.  But it seems like LegacyWebArchive::create should have the same behaviour whether it is passed the frame or the document I think this is likely either a bug, or a case for a function to be renamed to make this clearer.  We should probably open a new bug to track this issue.
Comment 3 Alice Liu 2011-02-28 20:25:24 PST
I filed https://bugs.webkit.org/show_bug.cgi?id=55445
Comment 4 Alice Liu 2011-02-28 20:28:35 PST
committed http://trac.webkit.org/changeset/79965