Bug 198561 - REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
Summary: REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view se...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Regression
Depends on:
Blocks:
 
Reported: 2019-06-05 05:08 PDT by Carlos Garcia Campos
Modified: 2019-06-06 22:46 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.96 KB, patch)
2019-06-05 05:10 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch (2.52 KB, patch)
2019-06-05 23:05 PDT, Carlos Garcia Campos
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2019-06-05 05:08:21 PDT
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.
Comment 1 Carlos Garcia Campos 2019-06-05 05:10:11 PDT
Created attachment 371389 [details]
Patch
Comment 2 Build Bot 2019-06-05 05:11:00 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Chris Dumez 2019-06-05 08:46:35 PDT
Comment on attachment 371389 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371389&action=review

> Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:4129
> +    getPage(webView).launchInitialProcessIfNecessary();

Can you please add this call at the beginning of WebPageProxy::restoreFromSessionState() instead? It seems like a useful thing to do for all ports.
Comment 4 Carlos Garcia Campos 2019-06-05 22:43:28 PDT
(In reply to Chris Dumez from comment #3)
> Comment on attachment 371389 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371389&action=review
> 
> > Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:4129
> > +    getPage(webView).launchInitialProcessIfNecessary();
> 
> Can you please add this call at the beginning of
> WebPageProxy::restoreFromSessionState() instead? It seems like a useful
> thing to do for all ports.

Sure, I thought you wanted the opposite, because cocoa based ports always want stale contents after session restore.
Comment 5 Carlos Garcia Campos 2019-06-05 23:05:38 PDT
Created attachment 371476 [details]
Patch
Comment 6 Carlos Garcia Campos 2019-06-06 22:46:09 PDT
Committed r246188: <https://trac.webkit.org/changeset/246188>