Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm

Issue 2869903002: [ios clean] Dismisses ToolsMenu on Layout changes. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
diff --git a/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm b/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
index 48003841e5e842087ebc234347379bafe143ab22..7d533e1db8fcc310dc5867f60614931a1aa4bbf4 100644
--- a/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
+++ b/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm
@@ -59,6 +59,8 @@ CGFloat kHorizontalMargin = 8.0f;
return self;
}
+#pragma mark - View lifecyle
+
- (void)viewDidLoad {
self.view.backgroundColor = [UIColor lightGrayColor];
@@ -94,6 +96,12 @@ CGFloat kHorizontalMargin = 8.0f;
]];
}
+- (void)viewWillLayoutSubviews {
+ // We need to dismiss the ToolsMenu everytime the Toolbar position changes
+ // (e.g. Size changes, rotation changes, etc.)
+ [self.dispatcher closeToolsMenu];
marq (ping after 24h) 2017/05/09 12:13:26 I'm pretty sure this isn't what we want. What if s
sczs 2017/05/10 02:25:46 Completely right, thanks for pointing this out. I
+}
+
#pragma mark - Components Setup
- (void)setUpToolbarButtons {

Powered by Google App Engine
This is Rietveld 408576698