| Index: ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
|
| diff --git a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
|
| index bdfcad661eced3e263d3fcc6dd2f08f31d3be217..b097d52082ad3e483ce4f5ae25681867cb4bf0a5 100644
|
| --- a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
|
| +++ b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
|
| @@ -25,6 +25,7 @@
|
| @property(nonatomic, weak) UIView* noTabsOverlay;
|
| @property(nonatomic, weak) TabGridToolbar* toolbar;
|
| @property(nonatomic, weak) MDCFloatingButton* floatingNewTabButton;
|
| +@property(nonatomic, assign) CGRect currentFrame;
|
| @end
|
|
|
| @implementation TabGridViewController
|
| @@ -32,6 +33,7 @@
|
| @synthesize noTabsOverlay = _noTabsOverlay;
|
| @synthesize toolbar = _toolbar;
|
| @synthesize floatingNewTabButton = _floatingNewTabButton;
|
| +@synthesize currentFrame = _currentFrame;
|
|
|
| #pragma mark - Required subclass override
|
|
|
| @@ -66,6 +68,8 @@
|
| [self.toolbar.trailingAnchor
|
| constraintEqualToAnchor:self.view.trailingAnchor]
|
| ]];
|
| +
|
| + self.currentFrame = self.view.frame;
|
| }
|
|
|
| - (void)viewWillAppear:(BOOL)animated {
|
| @@ -85,6 +89,15 @@
|
| UIEdgeInsetsMake(CGRectGetMaxY(self.toolbar.frame), 0, 0, 0);
|
| }
|
|
|
| +- (void)viewWillLayoutSubviews {
|
| + // We need to dismiss the ToolsMenu everytime the Toolbar frame changes
|
| + // (e.g. Size changes, rotation changes, etc.)
|
| + if (!CGRectEqualToRect(self.currentFrame, self.view.frame)) {
|
| + [self.dispatcher closeToolsMenu];
|
| + }
|
| + self.currentFrame = self.view.frame;
|
| +}
|
| +
|
| #pragma mark - SettingsActions
|
|
|
| - (void)showSettings:(id)sender {
|
|
|