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

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

Issue 1545023002: Relanding fix from ea9b0ba419a3598bdb7f7c62afdf4409afa73ab1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: 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 08c4c9c88798ed9955577c5c8e334c6e536bbddb..e8c9d2b16ee09017575ab622fe6ac3408da3aac5 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -300,22 +300,15 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
gfx::Rect new_pos = FindBarController::GetLocationForFindbarView(
view_location, widget_bounds, avoid_overlapping_rect);
- // While we are animating, the Find window will grow bottoms up so we need to
- // re-position the widget so that it appears to grow out of the toolbar.
- if (animation_offset() > 0)
- new_pos.Offset(0, std::min(0, -animation_offset()));
-
return new_pos;
}
void FindBarHost::SetDialogPosition(const gfx::Rect& new_pos) {
+ DropdownBarHost::SetDialogPosition(new_pos);
+
if (new_pos.IsEmpty())
return;
- if (!host()->IsVisible())
- host()->Show();
- host()->SetBounds(new_pos);
-
// Tell the immersive mode controller about the find bar's new bounds. The
// immersive mode controller uses the bounds to keep the top-of-window views
// revealed when the mouse is hovered over the find bar.
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698