Commit bcb6a673 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Stops animating InfobarBanner dismissal on removeView.

When too many Infobar Banners are dismissed and presented right after the
other by stopping their Coordinators, the Banners won't be queued, and the
dismissal animation of the first one might cause the second banner to be
presented after its own Coordinator has been stopped, leaving a presented
bannerVC.

This CL stops animating the banner dismissal whenever its Coordinator has
been stopped.

Bug: 1020199
Change-Id: I2f44867e5265abea8d18c94641c78e2b2c42b656
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1898747Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712800}
parent dda49d87
......@@ -186,10 +186,14 @@ const CGFloat kiPadBannerOverlapWithOmnibox = 10.0;
#pragma mark InfobarUIDelegate
- (void)removeView {
[self dismissInfobarBanner:self animated:YES completion:nil];
// Do not animate the dismissal since the Coordinator might have been stopped
// and the animation can cause undefined behavior.
[self dismissInfobarBanner:self animated:NO completion:nil];
}
- (void)detachView {
// Do not animate the dismissals since the Coordinator might have been stopped
// and the animation can cause undefined behavior.
if (self.bannerViewController)
[self dismissInfobarBanner:self animated:NO completion:nil];
if (self.modalViewController)
......
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