| Index: ios/web/web_state/ui/crw_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
|
| index 0758389f047aa29c97410f074cf820f928641919..0794ea177d0fa0caa1187798c129f9d38a6da3d9 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller.mm
|
| @@ -2079,30 +2079,11 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
|
|
|
| - (void)loadCancelled {
|
| [_passKitDownloader cancelPendingDownload];
|
| -
|
| - // Current load will not complete; this should be communicated upstream to the
|
| - // delegate.
|
| - switch (_loadPhase) {
|
| - case web::LOAD_REQUESTED:
|
| - // Load phase after abort is always PAGE_LOADED.
|
| - _loadPhase = web::PAGE_LOADED;
|
| - if (!_isHalted) {
|
| - _webStateImpl->SetIsLoading(false);
|
| - }
|
| - [_delegate webCancelStartLoadingRequest];
|
| - break;
|
| - case web::PAGE_LOADING:
|
| - // The previous load never fully completed before this page change. The
|
| - // loadPhase is changed to PAGE_LOADED to indicate the cycle is complete,
|
| - // and the delegate is called.
|
| - _loadPhase = web::PAGE_LOADED;
|
| - if (!_isHalted) {
|
| - _webStateImpl->SetIsLoading(false);
|
| - }
|
| - [_delegate webLoadCancelled:_URLOnStartLoading];
|
| - break;
|
| - case web::PAGE_LOADED:
|
| - break;
|
| + if (_loadPhase != web::PAGE_LOADED) {
|
| + _loadPhase = web::PAGE_LOADED;
|
| + if (!_isHalted) {
|
| + _webStateImpl->SetIsLoading(false);
|
| + }
|
| }
|
| }
|
|
|
|
|