Title: [246188] trunk/Source/WebKit
Revision
246188
Author
[email protected]
Date
2019-06-06 22:46:03 -0700 (Thu, 06 Jun 2019)

Log Message

REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
https://bugs.webkit.org/show_bug.cgi?id=198561

Reviewed by Chris Dumez.

This is another regression of delaying the web process launch until the first load. If the session is restored
before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
those cases, the history item is not marked as restored from session. We need to ensure the session is restored
in the web process from the IPC message handler, by launching the initial process before the session is
restored.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (246187 => 246188)


--- trunk/Source/WebKit/ChangeLog	2019-06-07 05:14:35 UTC (rev 246187)
+++ trunk/Source/WebKit/ChangeLog	2019-06-07 05:46:03 UTC (rev 246188)
@@ -1,3 +1,21 @@
+2019-06-06  Carlos Garcia Campos  <[email protected]>
+
+        REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
+        https://bugs.webkit.org/show_bug.cgi?id=198561
+
+        Reviewed by Chris Dumez.
+
+        This is another regression of delaying the web process launch until the first load. If the session is restored
+        before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
+        state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
+        from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
+        those cases, the history item is not marked as restored from session. We need to ensure the session is restored
+        in the web process from the IPC message handler, by launching the initial process before the session is
+        restored.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::restoreFromSessionState):
+
 2019-06-06  Youenn Fablet  <[email protected]>
 
         Use an enumeration in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo callback

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (246187 => 246188)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-06-07 05:14:35 UTC (rev 246187)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-06-07 05:46:03 UTC (rev 246188)
@@ -3083,6 +3083,13 @@
     bool hasBackForwardList = !!sessionState.backForwardListState.currentIndex;
 
     if (hasBackForwardList) {
+        // If there isn't a running process yet the RestoreSession message below is just ignored, and
+        // session is restored when the web process is created via creation parameters which is not
+        // considered an API request. So, we launch the initial process here before restoring the
+        // session to ensure the session is restored in the web process via RestoreSession IPC message
+        // which is considered an API request. See https://bugs.webkit.org/show_bug.cgi?id=198561.
+        launchInitialProcessIfNecessary();
+
         m_backForwardList->restoreFromState(WTFMove(sessionState.backForwardListState));
         process().send(Messages::WebPage::RestoreSession(m_backForwardList->itemStates()), m_pageID);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to