-
beidson@apple.com authored
2008-03-27 Brady Eidson <beidson@apple.com> Reviewed by Adam Roben Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore as the push to core-ify WebArchives continues. This patch also introduces a behavior change. WebCore allows ArchiveResources with null or empty data. WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null. Since WebResource is API, I decided to leave it be to avoid a behavior change. But internally created resources (as in "while archiving a page") are accepting of null or empty data. This actually fixes a bug where not all subframes are archived, and resulted in a layout test change. * WebCore.base.exp: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::archiveResourceForURL): Make this const (WebCore::DocumentLoader::mainResource): (WebCore::DocumentLoader::subresource): Make this const and relocate (WebCore::DocumentLoader::getSubresources): * loader/DocumentLoader.h: WebKit/mac: 2008-03-27 Brady Eidson <beidson@apple.com> Reviewed by Adam Roben Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore as the push to core-ify WebArchives continues. This patch also introduces a behavior change. WebCore allows ArchiveResources with null or empty data. WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null. Since WebResource is API, I decided to leave it be to avoid a behavior change. But internally created resources (as in "while archiving a page") are accepting of null or empty data. This actually fixes a bug where not all subframes are archived, and resulted in a layout test change. * WebView/WebDataSource.mm: (-[WebDataSource mainResource]): Call DocumentLoader implementation (-[WebDataSource subresources]): Ditto * WebView/WebFrame.mm: Remove [WebFrame _getAllResourceDatas:andResponses:] as its only caller is obsolete * WebView/WebFrameInternal.h: LayoutTests: 2008-03-27 Brady Eidson <beidson@apple.com> Reviewed by Adam Roben Updated results, as we now more consistently archive empty frames/empty resources * webarchive/archive-empty-frame-source-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
59712ce1