[webkit-changes] [WebKit/WebKit] 2ede46: Create Navigation when restoring all items in back...

Matthew Finkel noreply at github.com
Fri Sep 1 23:31:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2ede4615af7ace55e5aade5800388a61d4c9d9c5
      https://github.com/WebKit/WebKit/commit/2ede4615af7ace55e5aade5800388a61d4c9d9c5
  Author: Matthew Finkel <sysrqb at apple.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp

  Log Message:
  -----------
  Create Navigation when restoring all items in back-forward list
https://bugs.webkit.org/show_bug.cgi?id=260636
rdar://problem/114351057

Reviewed by Chris Dumez.

If we restore from saved session state and the restored state contained a
back/forword list, we won't create a Navigation for the current item. As a
result, we'll use 0 as the placeholder navigationID when we set the pending API
request. We eventually create a new API::Navigation in
WebPageProxy::decidePolicyForNavigationAction() but we don't update
PageLoadState::m_committedState.pendingAPIRequest if that was initalized, and
this creates an inconsistency between the new navigationID and the cached value
in PageLoadState::m_committedState.pendingAPIRequest.navigationID when we
compare them in later steps.

In this patch, I create an API::Navigation regardless of the current item we
are restoring. This patch adds a new API test.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goToBackForwardItem):
* Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
(TestWebKitAPI::decidePolicyForNavigationActionIgnore):
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/267579@main




More information about the webkit-changes mailing list