| Index: chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
|
| diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
|
| index 154a5f9e986fdbc75d147423f38194e109791e6d..0948543598d567deb0f4fed21a0ebe6fca97d940 100644
|
| --- a/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
|
| +++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
|
| @@ -10,6 +10,7 @@ import android.text.Editable;
|
| import android.text.TextUtils;
|
| import android.text.TextWatcher;
|
| import android.view.View;
|
| +import android.view.View.OnLayoutChangeListener;
|
| import android.widget.AdapterView;
|
| import android.widget.AdapterView.OnItemClickListener;
|
| import android.widget.ListPopupWindow;
|
| @@ -50,6 +51,16 @@ public class SuggestionPopup implements OnSuggestionsReceivedListener, TextWatch
|
| mUrlField = urlField;
|
| mToolbar = toolbar;
|
| mAutocomplete = new AutocompleteController(this);
|
| + OnLayoutChangeListener listener = new OnLayoutChangeListener() {
|
| + @Override
|
| + public void onLayoutChange(View v, int left, int top, int right, int bottom,
|
| + int oldLeft, int oldTop, int oldRight, int oldBottom) {
|
| + if (mSuggestionsPopup == null || !mSuggestionsPopup.isShowing()) return;
|
| + mSuggestionsPopup.setWidth(mUrlField.getWidth());
|
| + mSuggestionsPopup.show();
|
| + }
|
| + };
|
| + mUrlField.addOnLayoutChangeListener(listener);
|
| }
|
|
|
| private void navigateToSuggestion(int position) {
|
|
|