Bug 210097 - WKWebViews should behave as if they had loaded something after restoring session state
Summary: WKWebViews should behave as if they had loaded something after restoring sess...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-06 22:47 PDT by Alex Christensen
Modified: 2020-06-10 11:00 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.11 KB, patch)
2020-04-06 22:53 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (5.23 KB, patch)
2020-04-08 16:17 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-04-06 22:47:04 PDT
WKWebViews should behave as if they had loaded something after restoring session state
Comment 1 Alex Christensen 2020-04-06 22:53:56 PDT
Created attachment 395655 [details]
Patch
Comment 2 Chris Dumez 2020-04-07 08:26:40 PDT
Comment on attachment 395655 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:3482
> +    m_hasCommittedAnyProvisionalLoads = true;

It seems we are lying by setting this boolean to true here. Would it work to update whatever call site is relying on this flag to also check the m_sessionStateWasRestoredByAPIRequest instead?
Comment 3 Chris Dumez 2020-04-07 08:32:53 PDT
Comment on attachment 395655 [details]
Patch

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

>> Source/WebKit/UIProcess/WebPageProxy.cpp:3482
>> +    m_hasCommittedAnyProvisionalLoads = true;
> 
> It seems we are lying by setting this boolean to true here. Would it work to update whatever call site is relying on this flag to also check the m_sessionStateWasRestoredByAPIRequest instead?

Changing this flag like this may have unintended consequences. For example, I believe we rely on this flag to avoid process-swapping when false. There is no reason to process swap after a session restore I believe.
Comment 4 Alex Christensen 2020-04-08 16:17:35 PDT
Created attachment 395883 [details]
Patch
Comment 5 EWS 2020-04-08 17:38:56 PDT
Committed r259770: <https://trac.webkit.org/changeset/259770>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395883 [details].
Comment 6 Radar WebKit Bug Importer 2020-04-08 17:39:14 PDT
<rdar://problem/61487794>
Comment 7 Alex Christensen 2020-06-10 11:00:10 PDT
Reverted in http://trac.webkit.org/r262845