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

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

Issue 14230025: Make the relationship between the find bar position and the top container height more obvious (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view_layout.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_host.cc
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index c158e95f505a7da6a6478dcf120a8133b817de64..b631e4836f7e8b304f4012137d0c8e0a22a08d23 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -268,6 +268,10 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
if (widget_bounds.width() < prefsize.width())
prefsize.set_width(widget_bounds.width());
+ // Don't show the find bar if |widget_bounds| is not tall enough.
+ if (widget_bounds.height() < prefsize.height())
+ return gfx::Rect();
+
// Place the view in the top right corner of the widget boundaries (top left
// for RTL languages).
gfx::Rect view_location;
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698