Index: ios/chrome/browser/ui/browser_view_controller.mm |
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm |
index 32bc6f7e3a4089fbbfc9fabdf277b6dfc4630e54..134c9568c7d66c37043103657929f5067d22910e 100644 |
--- a/ios/chrome/browser/ui/browser_view_controller.mm |
+++ b/ios/chrome/browser/ui/browser_view_controller.mm |
@@ -2885,13 +2885,18 @@ - (void)overscrollActionsController:(OverscrollActionsController*)controller |
case OverscrollAction::CLOSE_TAB: |
[self closeCurrentTab]; |
break; |
- case OverscrollAction::REFRESH: |
+ case OverscrollAction::REFRESH: { |
if ([[[_model currentTab] webController] loadPhase] == |
web::PAGE_LOADING) { |
[[_model currentTab] stopLoading]; |
} |
- [[_model currentTab] reload]; |
+ |
+ web::WebState* webState = [_model currentTab].webState; |
+ if (webState) |
+ webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL, |
+ true /* check_for_repost */); |
break; |
+ } |
case OverscrollAction::NONE: |
NOTREACHED(); |
break; |
@@ -3842,9 +3847,11 @@ - (IBAction)locationBarDidResignFirstResponder:(id)sender { |
// editing ends (i.e., editing was cancelled), restart the cancelled load. |
if (_locationBarEditCancelledLoad) { |
_locationBarEditCancelledLoad = NO; |
- if (!_toolbarModelIOS->IsLoading()) { |
- [[_model currentTab] reload]; |
- } |
+ |
+ web::WebState* webState = [_model currentTab].webState; |
+ if (!_toolbarModelIOS->IsLoading() && webState) |
+ webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL, |
+ false /* check_for_repost */); |
} |
} |
@@ -3986,9 +3993,13 @@ - (IBAction)chromeExecuteCommand:(id)sender { |
[super chromeExecuteCommand:sender]; |
} |
break; |
- case IDC_RELOAD: |
- [[_model currentTab] reload]; |
+ case IDC_RELOAD: { |
+ web::WebState* webState = [_model currentTab].webState; |
+ if (webState) |
+ webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL, |
+ true /* check_for_repost */); |
break; |
+ } |
case IDC_SHARE_PAGE: |
[self sharePage]; |
break; |