Title: [186077] trunk/Source/WebKit2
Revision
186077
Author
[email protected]
Date
2015-06-29 12:08:20 -0700 (Mon, 29 Jun 2015)

Log Message

[WK2][iOS] Add WKWebView private API to save a back/forward snapshot
https://bugs.webkit.org/show_bug.cgi?id=146398
<rdar://problem/21584231>

Reviewed by Dan Bernstein.

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.

This matches the WKView.saveBackForwardSnapshotForItem API we have on
Mac.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView saveBackForwardSnapshotForItem:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (186076 => 186077)


--- trunk/Source/WebKit2/ChangeLog	2015-06-29 19:04:36 UTC (rev 186076)
+++ trunk/Source/WebKit2/ChangeLog	2015-06-29 19:08:20 UTC (rev 186077)
@@ -1,3 +1,22 @@
+2015-06-29  Chris Dumez  <[email protected]>
+
+        [WK2][iOS] Add WKWebView private API to save a back/forward snapshot
+        https://bugs.webkit.org/show_bug.cgi?id=146398
+        <rdar://problem/21584231>
+
+        Reviewed by Dan Bernstein.
+
+        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.
+
+        This matches the WKView.saveBackForwardSnapshotForItem API we have on
+        Mac.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView saveBackForwardSnapshotForItem:]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+
 2015-06-29  Anders Carlsson  <[email protected]>
 
         Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (186076 => 186077)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-06-29 19:04:36 UTC (rev 186076)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-06-29 19:08:20 UTC (rev 186077)
@@ -2352,6 +2352,11 @@
     _page->hideFindUI();
 }
 
+- (void)_saveBackForwardSnapshotForItem:(WKBackForwardListItem *)item
+{
+    _page->recordNavigationSnapshot(item._item);
+}
+
 - (id <_WKFormDelegate>)_formDelegate
 {
     return _formDelegate.getAutoreleased();

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (186076 => 186077)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2015-06-29 19:04:36 UTC (rev 186076)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2015-06-29 19:08:20 UTC (rev 186077)
@@ -209,6 +209,7 @@
 
 - (WKNavigation *)_loadRequest:(NSURLRequest *)request withOptions:(WK_DICTIONARY(NSString *, id) *)loadOptions WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 
+- (void)_saveBackForwardSnapshotForItem:(WKBackForwardListItem *)item WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
 @end
 
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to