New issue
Advanced search Search tips

Issue 797787 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

LanguageSelectionViewController is not dismissed when Tab is closed

Project Member Reported by eugene...@chromium.org, Dec 27 2017

Issue description

App Version (from "Chrome Settings > About Chrome"): ToT
iOS Version: All
Device: All

Steps to reproduce: 
1.) Load a web site in that require translation
2.) Tap on detected or suggested language to bring language picker UI
3.) Close the tab
4.) Open a new tab

Observed behavior: 
-[LanguageSelectionMediator languageNameAtIndex:] is called and it DCHECKs

Expected behavior: 
Language selection coordinator should be stopped after the Tab is closed

 

Comment 1 by marq@chromium.org, Dec 27 2017

Cc: -marq@chromium.org
Labels: Bling-Arch-Presentation
Owner: marq@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by marq@chromium.org, Dec 29 2017

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20

commit b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20
Author: Mark Cogan <marq@google.com>
Date: Fri Dec 29 12:04:44 2017

[iOS] Fix language selection popup edge cases.

This CL fixes several edge cases for the language selection popup; these all involve
circumstances where the popup should be implicitly dismissed.

In order to facilitate this, the LanguageSelectionHandler has a -dismissLanguageSelector
method added.

In ChromeIOSTranslateClent::WebStateDestroyed, a call to -dismissLanguageSelector is added. This
handles the case where the tab showing the selector is closed.

In BVC's tabModel:didChangeActiveTab:previousTab:atIndex: method, a call to
-dismissLanguageSelector is made if there's an infobar container. This handles the case where the
active tab changes while the selector is displayed, dismissing it.

LanguageSelectionCoordinator implements -dismissLanguageSelector by dismissing the contained
view controller without animation.

VerticalAnimationContainer has some added DCHECKS and logic to handle and/or warn about some
cases that can come up when dismissing the container when its base view controller is outside
of the view hierarchy.

Bug:  797787 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Id2714d92441f4cea0b6aaeeb48d0751d8e3df465
Reviewed-on: https://chromium-review.googlesource.com/845679
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Stepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526369}
[modify] https://crrev.com/b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20/ios/chrome/browser/translate/chrome_ios_translate_client.mm
[modify] https://crrev.com/b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20/ios/chrome/browser/translate/language_selection_handler.h
[modify] https://crrev.com/b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20/ios/chrome/browser/ui/presenters/contained_presenter.h
[modify] https://crrev.com/b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20/ios/chrome/browser/ui/presenters/vertical_animation_container.mm
[modify] https://crrev.com/b12391c6b25d1b47c83d1333e2d7f8fe2c55ed20/ios/chrome/browser/ui/translate/language_selection_coordinator.mm

Comment 4 by marq@chromium.org, Jan 4 2018

Issue 798050 has been merged into this issue.

Comment 5 by marq@chromium.org, Jan 4 2018

Status: Fixed (was: Started)
Cc: linds...@chromium.org
Status: Verified (was: Fixed)
Verified based on the steps reported.
Device: iPhone6s, iPhoneX
iOS: 10.3.3, 11.2.5 beta#3
Version: M65.0.3311.0 canary.

Note: Issue 798050 is marked as RBS for M64. So please check if this fix needs tobe merged into M64.

Comment 7 by cmasso@google.com, Jan 5 2018

Labels: End-of-January
Labels: M-64 ReleaseBlock-Stable
Mark does this need to be merged still? 

Marking as RBS for M64 as Issue 798050 is.

Comment 9 by cmasso@google.com, Jan 24 2018

Status: Assigned (was: Verified)
This was marked as RBS when it was already in a verified state and therefore did not really block M64. This fix was never merged into M64 as far as I can tell since there are some reports on M64 stable. Mark, how critical is this?

Comment 10 by cmasso@google.com, Jan 24 2018

Cc: pkl@chromium.org

Comment 11 by marq@chromium.org, Jan 24 2018

It's not a crasher, but there are some pretty ugly UI states that can result. This is a lot of code to merge into 64 at this stage though.

Comment 12 by marq@chromium.org, Jan 25 2018

Status: Verified (was: Assigned)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-64; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-64 label, otherwise remove Merge-TBD label. Thanks.

Comment 14 by cmasso@google.com, Feb 9 2018

Labels: M-65
Mark, do we have the fix in M65 though?

Comment 15 by cmasso@google.com, Feb 9 2018

Labels: -Merge-TBD
Yup!

Sign in to add a comment