Commit 75c50929 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Dismiss translate infobar on navigation

Call -dismissLanguageSelector on navigation by adding a call in
-tabModel:willStartLoadingTab: (in BVC).

Fix a regression that was introduced by http://crrev.com/c/867042
where -notifyTabLoading: was not called.

Bug: 820590, 809577
Change-Id: I718c20bb4beefd04a51a7b49f69e320907705d0d
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/962450Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543357}
parent ffed5cfe
......@@ -873,7 +873,7 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
didCommitNavigationWithDetails:
(const web::LoadCommittedDetails&)load_details {
Tab* tab = LegacyTabHelper::GetTabForWebState(webState);
[self notifyTabChanged:tab];
[self notifyTabLoading:tab];
web::NavigationItem* previousItem = nullptr;
if (load_details.previous_item_index >= 0) {
......
......@@ -4840,6 +4840,10 @@ bubblePresenterForFeature:(const base::Feature&)feature
// Stop any Find in Page searches and close the find bar when navigating to a
// new page.
[self closeFindInPage];
// Dismiss the language selector, if any; this is a no-op when there's no
// language selector presented.
[_languageSelectionCoordinator dismissLanguageSelector];
}
- (void)tabModel:(TabModel*)model didChangeTab:(Tab*)tab {
......
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