| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| index 295bb67cab4e4694d12bca03e3db41383348cc22..97852aefb1c0f541b1df6db6892dd0e1b8331d68 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| @@ -237,6 +237,7 @@ public class ContentViewCore
|
|
|
| private PopupZoomer mPopupZoomer;
|
| private SelectPopup mSelectPopup;
|
| + private long mNativeSelectPopupSourceFrame = 0;
|
|
|
| private Runnable mFakeMouseMoveRunnable = null;
|
|
|
| @@ -1913,8 +1914,10 @@ public class ContentViewCore
|
|
|
| public void selectPopupMenuItems(int[] indices) {
|
| if (mNativeContentViewCore != 0) {
|
| - nativeSelectPopupMenuItems(mNativeContentViewCore, indices);
|
| + nativeSelectPopupMenuItems(mNativeContentViewCore, mNativeSelectPopupSourceFrame,
|
| + indices);
|
| }
|
| + mNativeSelectPopupSourceFrame = 0;
|
| mSelectPopup = null;
|
| }
|
|
|
| @@ -2305,6 +2308,7 @@ public class ContentViewCore
|
|
|
| /**
|
| * Called (from native) when the <select> popup needs to be shown.
|
| + * @param nativeSelectPopupSourceFrame The native RenderFrameHost that owns the popup.
|
| * @param items Items to show.
|
| * @param enabled POPUP_ITEM_TYPEs for items.
|
| * @param multiple Whether the popup menu should support multi-select.
|
| @@ -2312,8 +2316,8 @@ public class ContentViewCore
|
| */
|
| @SuppressWarnings("unused")
|
| @CalledByNative
|
| - private void showSelectPopup(Rect bounds, String[] items, int[] enabled, boolean multiple,
|
| - int[] selectedIndices) {
|
| + private void showSelectPopup(long nativeSelectPopupSourceFrame, Rect bounds, String[] items,
|
| + int[] enabled, boolean multiple, int[] selectedIndices) {
|
| if (mContainerView.getParent() == null || mContainerView.getVisibility() != View.VISIBLE) {
|
| selectPopupMenuItems(null);
|
| return;
|
| @@ -2330,6 +2334,7 @@ public class ContentViewCore
|
| } else {
|
| mSelectPopup = new SelectPopupDialog(this, popupItems, multiple, selectedIndices);
|
| }
|
| + mNativeSelectPopupSourceFrame = nativeSelectPopupSourceFrame;
|
| mSelectPopup.show();
|
| }
|
|
|
| @@ -3155,7 +3160,8 @@ public class ContentViewCore
|
| private native void nativeSetMultiTouchZoomSupportEnabled(
|
| long nativeContentViewCoreImpl, boolean enabled);
|
|
|
| - private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImpl, int[] indices);
|
| + private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImpl,
|
| + long nativeSelectPopupSourceFrame, int[] indices);
|
|
|
| private native void nativeClearHistory(long nativeContentViewCoreImpl);
|
|
|
|
|