WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146398
[WK2][iOS] Add WKWebView private API to save a back/forward snapshot
https://bugs.webkit.org/show_bug.cgi?id=146398
Summary
[WK2][iOS] Add WKWebView private API to save a back/forward snapshot
Chris Dumez
Reported
2015-06-28 13:02:34 PDT
Add WKWebView private API to save a back/forward snapshot so that the client can make sure a back/forward snapshot is available even when swapping WKWebView upon navigation.
Attachments
Patch
(2.34 KB, patch)
2015-06-28 13:23 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2015-06-28 13:02:47 PDT
rdar://problem/21584231
mitz
Comment 2
2015-06-28 13:08:08 PDT
Is this something the existing session state API can do?
Chris Dumez
Comment 3
2015-06-28 13:09:19 PDT
(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;
Chris Dumez
Comment 4
2015-06-28 13:22:44 PDT
(In reply to
comment #2
)
> Is this something the existing session state API can do?
Please see comment on radar.
Chris Dumez
Comment 5
2015-06-28 13:23:13 PDT
Created
attachment 255729
[details]
Patch
mitz
Comment 6
2015-06-28 13:26:28 PDT
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?
Chris Dumez
Comment 7
2015-06-28 13:30:44 PDT
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.
WebKit Commit Bot
Comment 8
2015-06-29 12:09:15 PDT
Comment on
attachment 255729
[details]
Patch Clearing flags on attachment: 255729 Committed
r186077
: <
http://trac.webkit.org/changeset/186077
>
WebKit Commit Bot
Comment 9
2015-06-29 12:09:19 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug