Bug 177825 - Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
Summary: Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
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: 2017-10-03 11:21 PDT by Alex Christensen
Modified: 2017-10-03 13:55 PDT (History)
3 users (show)

See Also:


Attachments
Patch (16.88 KB, patch)
2017-10-03 11:23 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (16.48 KB, patch)
2017-10-03 11:40 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
API test crashlog (65.78 KB, text/plain)
2017-10-03 13:55 PDT, Ryan Haddad
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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