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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 22563006: Fixes vertical misalignment of IME autocompletion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | ui/views/controls/textfield/native_textfield_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 72a84ce3a9d8985274c0a5ce3c84e979787e033a..3cd60393edcfaadf75a18fee2ccf83ddb73c24ed 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -880,8 +880,11 @@ void LocationBarView::Layout() {
else if (location_needed_width + width > entry_width)
x = entry_width - width;
location_bounds.set_width(x);
+ const int baseline_diff = location_entry_view_->GetBaseline() -
Peter Kasting 2013/08/09 19:00:48 Instead of doing this here, shouldn't we be doing
Yuki 2013/08/12 06:30:14 That's right. I've moved the code to the initiali
+ ime_inline_autocomplete_view_->GetBaseline();
ime_inline_autocomplete_view_->SetBounds(
- location_bounds.right(), location_bounds.y(),
+ location_bounds.right(),
+ location_bounds.y() + baseline_diff,
std::min(width, entry_width),
ime_inline_autocomplete_view_->GetPreferredSize().height());
}
« no previous file with comments | « no previous file | ui/views/controls/textfield/native_textfield_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698