| Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| index 4ba3789b5d8183326b50af945843607092dbaabe..ccb960e3e83bc5a9f743fe3a8ad4e662b5c90b58 100644
|
| --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| @@ -44,7 +44,6 @@
|
| #include "ui/gfx/selection_model.h"
|
| #include "ui/views/border.h"
|
| #include "ui/views/button_drag_utils.h"
|
| -#include "ui/views/controls/textfield/native_textfield_views.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
| #include "ui/views/ime/input_method.h"
|
| #include "ui/views/layout/fill_layout.h"
|
| @@ -176,7 +175,7 @@ void OmniboxViewViews::Init() {
|
|
|
| // Initialize the popup view using the same font.
|
| popup_view_.reset(OmniboxPopupContentsView::Create(
|
| - font_list(), this, model(), location_bar_view_));
|
| + GetFontList(), this, model(), location_bar_view_));
|
|
|
| #if defined(OS_CHROMEOS)
|
| chromeos::input_method::InputMethodManager::Get()->
|
| @@ -674,7 +673,9 @@ base::string16 OmniboxViewViews::GetGrayTextAutocompletion() const {
|
| }
|
|
|
| int OmniboxViewViews::GetTextWidth() const {
|
| - return textfield_view_->GetWidthNeededForText();
|
| + // Returns the width necessary to display the current text, including any
|
| + // necessary space for the cursor or border/margin.
|
| + return GetRenderText()->GetContentWidth() + GetInsets().width();
|
| }
|
|
|
| int OmniboxViewViews::GetWidth() const {
|
|
|