Bug 196930

Summary: process-swap-on-navigation error when loading blocked websites
Product: WebKit Reporter: Justin Cohen <justincohen>
Component: Page LoadingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, ajuma, beidson, cdumez, commit-queue, dbates, ews, ggaren, japhet, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: iPhone / iPad   
OS: iOS 12   
See Also: https://bugs.webkit.org/show_bug.cgi?id=198626
Attachments:
Description Flags
WIP Patch
none
WIP Patch
none
Archive of layout-test-results from ews103 for mac-highsierra
none
Archive of layout-test-results from ews106 for mac-highsierra-wk2
none
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Archive of layout-test-results from ews117 for mac-highsierra
none
Patch
none
Part 1
none
Part 2 none

Description Justin Cohen 2019-04-15 13:41:40 PDT
Steps:
- Enable content restrictions and set web content to 'allowed websites only' (e.g. disney.com)
- Visit disney.com
- Visit cnn.com


In WKWebView, I see WebKit print the following error:
 [ProcessSwapping] 0x117324160 - ProvisionalPageProxy::didFailProvisionalLoadForFrame: pageID = 2, frameID = 1, navigationID = 5

I see a didFailProvisionalNavigation callback, but no didFinishNavigation and I don't see the built in error page (You cannot browse this page at "cnn.com" because it is restricted.)  I still see disney.com

If I immediately load cnn.com in a new WKWebView, I do see the proper error page.

MobileSafari is also inconsistent.  If you visit cnn.com on a new page you see the correct restricted error.  If you visit disney.com first, you see (Safari cannot open the page.  The error was; "The URL was blocked by a content filter."
Comment 1 Radar WebKit Bug Importer 2019-04-15 14:48:48 PDT
<rdar://problem/49918639>
Comment 2 Radar WebKit Bug Importer 2019-04-15 14:48:59 PDT
<rdar://problem/49918644>
Comment 3 Chris Dumez 2019-04-15 16:53:04 PDT Comment hidden (obsolete)
Comment 4 Chris Dumez 2019-04-15 16:53:31 PDT
<rdar://problem/47819301>
Comment 5 Chris Dumez 2019-04-16 08:44:06 PDT Comment hidden (obsolete)
Comment 6 Build Bot 2019-04-16 09:47:44 PDT Comment hidden (obsolete)
Comment 7 Build Bot 2019-04-16 09:47:46 PDT Comment hidden (obsolete)
Comment 8 Build Bot 2019-04-16 10:01:33 PDT Comment hidden (obsolete)
Comment 9 Build Bot 2019-04-16 10:01:35 PDT Comment hidden (obsolete)
Comment 10 Build Bot 2019-04-16 13:41:12 PDT Comment hidden (obsolete)
Comment 11 Build Bot 2019-04-16 13:41:14 PDT Comment hidden (obsolete)
Comment 12 Build Bot 2019-04-16 15:44:18 PDT Comment hidden (obsolete)
Comment 13 Build Bot 2019-04-16 15:44:20 PDT Comment hidden (obsolete)
Comment 14 Andy Estes 2019-06-06 15:48:00 PDT Comment hidden (obsolete)
Comment 15 Chris Dumez 2019-06-06 15:53:34 PDT
Comment on attachment 371531 [details]
Patch

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

r=me

> Source/WebCore/loader/ContentFilter.h:65
> +    bool willHandleProvisionalLoadFailure(const ResourceError&);

nit: Should probably be a const method.
Comment 16 Andy Estes 2019-06-06 22:38:00 PDT
Created attachment 371562 [details]
Part 1
Comment 17 Andy Estes 2019-06-06 22:46:35 PDT
Created attachment 371563 [details]
Part 2
Comment 18 WebKit Commit Bot 2019-06-06 23:09:46 PDT
Comment on attachment 371562 [details]
Part 1

Clearing flags on attachment: 371562

Committed r246190: <https://trac.webkit.org/changeset/246190>
Comment 19 WebKit Commit Bot 2019-06-07 08:44:10 PDT
Comment on attachment 371563 [details]
Part 2

Clearing flags on attachment: 371563

Committed r246201: <https://trac.webkit.org/changeset/246201>
Comment 20 WebKit Commit Bot 2019-06-07 08:44:12 PDT
All reviewed patches have been landed.  Closing bug.