Commit 4ce19321 authored by Kurt Horimoto's avatar Kurt Horimoto Committed by Commit Bot

Don't stop loading for overscroll refresh action.

StopLoading() discards non-committed items, meaning that a refresh
for a pending load would reload the previous page rather than retrying
the pending load.

Bug: 787795
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I186fdd847d7a738dec6cb62125ff83c491a3ae72
Reviewed-on: https://chromium-review.googlesource.com/794014Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519778}
parent cd0c516c
......@@ -3395,19 +3395,9 @@ bubblePresenterForFeature:(const base::Feature&)feature
case OverscrollAction::CLOSE_TAB:
[self.dispatcher closeCurrentTab];
break;
case OverscrollAction::REFRESH: {
web::WebState* webState = [_model currentTab].webState;
if (webState) {
if (webState->IsLoading()) {
webState->Stop();
}
// |check_for_repost| is true because the reload is explicitly initiated
// by the user.
webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL,
true /* check_for_repost */);
}
case OverscrollAction::REFRESH:
[self reload];
break;
}
case OverscrollAction::NONE:
NOTREACHED();
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment