Blank viewer comes up and then auto-dismisses when device is not connected to Internet
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jun 2018 00:26:17 +0000 (00:26 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jun 2018 00:26:17 +0000 (00:26 +0000)
commitf268d5fca75382e56a72afd0473a2a39eb6ffee6
tree1def157b57376e5fec569fec87f0af2ebcee4f5f
parent53ee6924433d42a410cdf81a015891f6861e1aef
Blank viewer comes up and then auto-dismisses when device is not connected to Internet
https://bugs.webkit.org/show_bug.cgi?id=186825
<rdar://problem/40294170>

Reviewed by Tim Horton.

Source/WebCore:

Export isSuccessful() to WebKit.

* platform/network/ResourceResponseBase.h:

Source/WebKit:

Handle the case where the network load fails, and send that
error onto QuickLook.

* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::didReceiveResponse): Check for success.
(WebKit::DownloadClient::processDidCrash): Cancel in the case of a crash.
(WebKit::DownloadClient::didFail): Propagate the error onto QuickLook.
* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
(-[_WKPreviewControllerDataSource failWithError:]): New method that calls
the completion handler with the error data.
(WebKit::SystemPreviewController::fail): New API method.
* UIProcess/SystemPreviewController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/ResourceResponseBase.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/DownloadClient.mm
Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm
Source/WebKit/UIProcess/SystemPreviewController.h