Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2765903003: Correctly reload URLs in web views if a native controller is displayed. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c15eb0c28b87b3c90437e3146c956e359006209b..185044c9733e2afdbb9ceb77a6f8bffd9c71f9d7 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -1980,7 +1980,9 @@ - (void)reloadInternal {
// cancelled.
_lastUserInteraction.reset();
base::RecordAction(UserMetricsAction("Reload"));
- if (_webView) {
+ if ([self shouldLoadURLInNativeView:self.currentNavItem->GetURL()]) {
Olivier 2017/03/21 17:50:26 I think this won't handle the Reading List loading
kkhorimoto 2017/03/21 17:59:46 Ahh you're right, I didn't think that through; the
+ [self.nativeController reload];
+ } else {
web::NavigationItem* transientItem =
self.navigationManagerImpl->GetTransientItem();
if (transientItem) {
@@ -1998,8 +2000,6 @@ - (void)reloadInternal {
// TODO(eugenebut): revisit this for WKWebView.
[self loadCurrentURL];
}
- } else {
- [self.nativeController reload];
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698