Commit 1ce5df9e authored by Robbie Gibson's avatar Robbie Gibson Committed by Chromium LUCI CQ

[iOS][Thumb Strip] Fix DCHECK when opening from recent tabs

The cause of this DCHECK (and resulting broken UI) was that as part of
closing the tab grid, the tab strip is snapshotted. As it has changed
(new tab added), everything, including the tab grid has to be re-laid
out. This causes the tab grid to scroll back to the recent tabs page,
causing the bvc to be removed after it was added correctly earlier.
This ends up with a broken UI and a black screen.

The fix is that the tab grid coordinator should alert the tab grid that
its content will disappear before changing the pan handler state.

Bug: 1094335
Change-Id: Ie9062766952b6a5957046b472515223010b6c58c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2632654Reviewed-by: default avataredchin <edchin@chromium.org>
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#844710}
parent 7d98a778
...@@ -251,6 +251,7 @@ ...@@ -251,6 +251,7 @@
viewController; viewController;
[self.baseViewController setNeedsStatusBarAppearanceUpdate]; [self.baseViewController setNeedsStatusBarAppearanceUpdate];
if (shouldCloseTabGrid) { if (shouldCloseTabGrid) {
[self.baseViewController contentWillDisappearAnimated:YES];
[self.thumbStripCoordinator.panHandler setState:ViewRevealState::Hidden [self.thumbStripCoordinator.panHandler setState:ViewRevealState::Hidden
animated:YES]; animated:YES];
......
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