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 333f1f2536527a9dc03dc9d6fd7f3234a3047b13..ac54fae6cb1165cbe32452f382ac5e5a74d5c55b 100644 |
--- a/ios/web/web_state/ui/crw_web_controller.mm |
+++ b/ios/web/web_state/ui/crw_web_controller.mm |
@@ -3413,9 +3413,10 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5; |
if (!inMainFrame && !userInteracted) |
return; |
- // Reset SSL status to default. |
+ // Reset SSL status to default, unless the load was cancelled (manually or by |
+ // back-forward navigation). |
web::NavigationManager* navManager = self.webState->GetNavigationManager(); |
- if (navManager->GetLastCommittedItem()) |
+ if (navManager->GetLastCommittedItem() && [error code] != NSURLErrorCancelled) |
navManager->GetLastCommittedItem()->GetSSL() = web::SSLStatus(); |
NSURL* errorURL = [NSURL |