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 eac7cf399f153f1eee3fd49092f8c66cec186d3d..2601aefbef21a400f9a8687534616aaff9d66dad 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 |
@@ -730,7 +730,7 @@ public class ContentViewCore |
mWebContentsObserver = new WebContentsObserverAndroid(this) { |
@Override |
public void didStartLoading(String url) { |
- hidePopupDialog(); |
+ hidePopup(); |
resetScrollInProgress(); |
resetGestureDetectors(); |
} |
@@ -1436,7 +1436,7 @@ public class ContentViewCore |
false); |
} |
mInForeground = false; |
- hidePopupDialog(); |
+ hidePopup(); |
setInjectedAccessibility(false); |
nativeOnHide(mNativeContentViewCore); |
} |
@@ -1463,7 +1463,7 @@ public class ContentViewCore |
!mRenderCoordinates.hasMobileViewport() && !mRenderCoordinates.hasFixedPageScale()); |
} |
- private void hidePopupDialog() { |
+ private void hidePopup() { |
if (mSelectPopupDialog != null) { |
mSelectPopupDialog.hide(); |
mSelectPopupDialog = null; |
@@ -1505,7 +1505,7 @@ public class ContentViewCore |
@SuppressLint("MissingSuperCall") |
public void onDetachedFromWindow() { |
setInjectedAccessibility(false); |
- hidePopupDialog(); |
+ hidePopup(); |
mZoomControlsDelegate.dismissZoomPicker(); |
unregisterAccessibilityContentObserver(); |
@@ -1566,7 +1566,7 @@ public class ContentViewCore |
mInputMethodManagerWrapper.restartInput(mContainerView); |
} |
mContainerViewInternals.super_onConfigurationChanged(newConfig); |
- |
+ updateSelectPopup(); |
// To request layout has side effect, but it seems OK as it only happen in |
// onConfigurationChange and layout has to be changed in most case. |
mContainerView.requestLayout(); |
@@ -2288,6 +2288,10 @@ public class ContentViewCore |
getContentViewClient().onImeStateChangeRequested(false); |
} |
+ public RenderCoordinates renderCoordinates() { |
Ted C
2014/04/12 01:10:27
This method already exists:
getRenderCoordinates
keishi
2014/04/15 14:41:07
Done.
|
+ return mRenderCoordinates; |
+ } |
+ |
@SuppressWarnings("unused") |
@CalledByNative |
private void updateFrameInfo( |
@@ -2367,6 +2371,8 @@ public class ContentViewCore |
if (mBrowserAccessibilityManager != null) { |
mBrowserAccessibilityManager.notifyFrameInfoInitialized(); |
} |
+ |
+ updateSelectPopup(); |
} |
@CalledByNative |
@@ -2403,20 +2409,23 @@ public class ContentViewCore |
*/ |
@SuppressWarnings("unused") |
@CalledByNative |
- private void showSelectPopup(String[] items, int[] enabled, boolean multiple, |
+ private void showSelectPopup(Rect bounds, String[] items, int[] enabled, |
+ double item_font_size, boolean multiple, |
Ted C
2014/04/12 01:10:27
camel cased param names in java
Should update the
|
int[] selectedIndices) { |
if (mContainerView.getParent() == null || mContainerView.getVisibility() != View.VISIBLE) { |
selectPopupMenuItems(null); |
return; |
} |
- |
- hideSelectPopup(); |
assert items.length == enabled.length; |
List<SelectPopupItem> popupItems = new ArrayList<SelectPopupItem>(); |
for (int i = 0; i < items.length; i++) { |
popupItems.add(new SelectPopupItem(items[i], enabled[i])); |
} |
- mSelectPopupDialog = SelectPopupDialog.show(this, popupItems, multiple, selectedIndices); |
+ |
+ hidePopup(); |
+ mSelectPopupDialog = SelectPopupDialog.show(this, bounds, popupItems, |
+ item_font_size, multiple, |
Ted C
2014/04/12 01:10:27
camel casing here too...and indenting should be 8
|
+ selectedIndices); |
} |
/** |
@@ -2437,6 +2446,12 @@ public class ContentViewCore |
return mSelectPopupDialog; |
} |
+ private void updateSelectPopup() { |
+ if (mSelectPopupDialog != null) { |
+ mSelectPopupDialog.update(null); |
+ } |
+ } |
+ |
@SuppressWarnings("unused") |
@CalledByNative |
private void showDisambiguationPopup(Rect targetRect, Bitmap zoomedBitmap) { |