Summary: | [WK2][iOS] Add WKWebView private API to save a back/forward snapshot | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | barraclough, commit-queue, mitz, thorton | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Chris Dumez
2015-06-28 13:02:34 PDT
Is this something the existing session state API can do? (In reply to comment #2) > Is this something the existing session state API can do? I will check. I was trying to match the way we currently do this on Mac: in WKViewPrivate.h - (void)saveBackForwardSnapshotForItem:(WKBackForwardListItemRef)item; (In reply to comment #2) > Is this something the existing session state API can do? Please see comment on radar. Created attachment 255729 [details]
Patch
Comment on attachment 255729 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255729&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:212 > +- (void)_saveBackForwardSnapshotForItem:(WKBackForwardListItem *)item WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); Can this be used on an item that isn’t the current item? What does it do in that case? Comment on attachment 255729 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255729&action=review >> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:212 >> +- (void)_saveBackForwardSnapshotForItem:(WKBackForwardListItem *)item WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); > > Can this be used on an item that isn’t the current item? What does it do in that case? Yes, it can and it is the intended use. On Mac, we have both saveBackForwardSnapshotForItem(item) and saveBackForwardSnapshotForCurrentItem(). What it does in this case is take a snapshot of the current view and save it on the WKBackForwardListItem that is given. The WKBackForwardListItem being given in this case would be from another WKWebView. Comment on attachment 255729 [details] Patch Clearing flags on attachment: 255729 Committed r186077: <http://trac.webkit.org/changeset/186077> All reviewed patches have been landed. Closing bug. |