Bug 177825

Summary: Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ryanhaddad, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
API test crashlog none

Description Alex Christensen 2017-10-03 11:21:25 PDT
Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
Comment 1 Alex Christensen 2017-10-03 11:23:42 PDT
Created attachment 322551 [details]
Patch
Comment 2 Tim Horton 2017-10-03 11:28:04 PDT
Comment on attachment 322551 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:1213
> +        if (m_navigationClient->canHandleWillGoToBackForwardListItem())
> +            m_navigationClient->willGoToBackForwardListItem(*this, *item, inPageCache, m_process->transformHandlesToObjects(userData.object()).get());

In both of these patches: didn't we previously use a bool return value to specify whether it was handled, instead of an extra function? I don't care either way, but it would be good to be consistent unless you have reason not to.
Comment 3 Alex Christensen 2017-10-03 11:40:35 PDT
Created attachment 322552 [details]
Patch
Comment 4 Alex Christensen 2017-10-03 11:54:25 PDT
http://trac.webkit.org/r222794
Comment 5 Radar WebKit Bug Importer 2017-10-03 11:55:45 PDT
<rdar://problem/34795612>
Comment 6 Ryan Haddad 2017-10-03 13:54:06 PDT
This change caused 11 API tests crashes on macOS:

Tests that failed:
  DeviceScaleFactorOnBack.WebKit2
  WebKit.MouseMoveAfterCrash
  WebKit.RestoreSessionStateContainingFormData
  WebKit.RestoreSessionStateContainingScrollRestorationDefault
  WebKit.RestoreStateAfterTermination
  WebKit.ShouldGoToBackForwardListItem
  WebKit.ShouldKeepCurrentBackForwardListItemInList
  WebKit.WKPageCopySessionStateWithFiltering
  WebKit.WKPageGetScaleFactorNotZero
  WebKit2_CommandBackForwardTestWKView.LTR
  WebKit2_CommandBackForwardTestWKView.RTL

https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK1%20%28Tests%29/builds/5020

They seem to be crashing in WebKit::WebPageProxy::willGoToBackForwardListItem(unsigned long long, bool, WebKit::UserData const&) + 87 (WebPageProxy.cpp:1212)
Comment 7 Ryan Haddad 2017-10-03 13:55:51 PDT
Created attachment 322575 [details]
API test crashlog