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

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

Issue 2503643002: Fixed collected cookies view info bar visibility (Closed)
Patch Set: Last comment wasn't accurate. This one explains what code was removed and why. 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..6ff780fddb95e390ab662db8f07a1edb5bf550d8 100644
--- a/chrome/browser/ui/views/collected_cookies_views.cc
+++ b/chrome/browser/ui/views/collected_cookies_views.cc
@@ -150,9 +150,11 @@ class InfobarView : public views::View {
// views::View overrides.
gfx::Size GetPreferredSize() const override {
- if (!visible())
- return gfx::Size();
-
+ // Removed the "if (!visible())" check in order to always return the
+ // preferred size. This ensures that the layout manager always reserves
+ // space within the view so it can be displayed. Otherwise, the layout
+ // manager doesn't provide a space for it to display and the size of the
+ // containing dialog isn't large enough for it to ever become visible.
Peter Kasting 2016/11/29 20:51:17 This comment makes sense in the context of this pa
// Add space around the banner.
gfx::Size size(content_->GetPreferredSize());
size.Enlarge(0, 2 * views::kRelatedControlVerticalSpacing);
« 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