Chromium Code Reviews| 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 6c926c06c7b6927f29403a948152e5f75f48c778..cc6865af9ee0fb149440c97f39f54f93329057f5 100644 |
| --- a/ios/web/web_state/ui/crw_web_controller.mm |
| +++ b/ios/web/web_state/ui/crw_web_controller.mm |
| @@ -3343,6 +3343,17 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5; |
| if ([self isMainFrameNavigationAction:action]) |
| [self stopLoading]; |
| + // Purge web view in case if last committed URL is different from the |
|
Jackie Quinn
2016/08/08 21:30:09
You could remove "in case"
Eugene But (OOO till 7-30)
2016/08/08 21:47:31
Done.
|
| + // document URL. This can happen if external URL was added to the navigation |
| + // stack and was loaded using Go Back or Go Forward navigation (in which |
| + // case document URL will point to the previous page). |
| + GURL lastCommittedURL = |
| + self.webState->GetNavigationManager()->GetLastCommittedItem()->GetURL(); |
| + if (lastCommittedURL != _documentURL) { |
| + [self requirePageReconstruction]; |
| + _documentURL = lastCommittedURL; |
|
Jackie Quinn
2016/08/08 21:30:09
Is this something that generally needs to be done
Eugene But (OOO till 7-30)
2016/08/08 21:47:31
No, it's a special case where _documentURL does no
|
| + } |
| + |
| if ([_delegate openExternalURL:requestURL |
| linkClicked:isNavigationTypeLinkActivated]) { |
| // Record the URL so that errors reported following the 'NO' reply can be |