Commit aa067124 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Fixes Collections layout issues when showing context menus.

Rotating or exiting multitasking while a context menu was visible would
result in the Collections tableviews being offset within the bubble.
Fixes this bug by forcing the tableview to fill its parent before
running the layout pass.

BUG=845534

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I72f1ab1d33d2b8ca22a32c9161e6eeaf561c7844
Reviewed-on: https://chromium-review.googlesource.com/1067866Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560772}
parent 9702b305
......@@ -161,6 +161,12 @@ const CGFloat kTableViewMaxWidth = 414.0;
- (void)containerViewWillLayoutSubviews {
self.dimmingShield.frame = self.containerView.bounds;
self.shadowContainer.frame = [self frameOfPresentedViewInContainerView];
// Force the presented VC's view to fill the tableViewContainer. Otherwise
// there are cases (switching size classes while another VC is presented over
// the tableView) where autoresizing does not properly size the presented VC's
// view to fill its parent.
self.presentedViewController.view.frame = self.tableViewContainer.bounds;
}
#pragma mark - Private Methods
......
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