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

Unified Diff: chrome/browser/ui/views/collected_cookies_views.cc

Issue 2503643002: Fixed collected cookies view info bar visibility (Closed)
Patch Set: Update comment per suggestion Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/collected_cookies_views.cc
diff --git a/chrome/browser/ui/views/collected_cookies_views.cc b/chrome/browser/ui/views/collected_cookies_views.cc
index 74979c5507c582d41fdcea49cde97ddbaeaa7143..12df9f91efd7dd09f820e04cab9019d3cbb8d500 100644
--- a/chrome/browser/ui/views/collected_cookies_views.cc
+++ b/chrome/browser/ui/views/collected_cookies_views.cc
@@ -150,8 +150,11 @@ class InfobarView : public views::View {
// views::View overrides.
gfx::Size GetPreferredSize() const override {
- if (!visible())
- return gfx::Size();
+ // Always return the preferred size, even if not currently visible. This
+ // ensures that the layout manager always reserves space within the view
+ // so it can be made visible when necessary. Otherwise, changing the
+ // visibility of this view would require the entire dialog to be resized,
+ // which is undesirable from both a UX and technical perspective.
// Add space around the banner.
gfx::Size size(content_->GetPreferredSize());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698