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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 699333003: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the core logic into Java side Created 5 years, 11 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
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 9246385f8588d6205b54339e37e350166fdcc358..de68bee8e82aaa0127efb659f9029832f7d51223 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
@@ -2232,7 +2232,10 @@ public class ContentViewCore
float pageScaleFactor, float minPageScaleFactor, float maxPageScaleFactor,
float contentWidth, float contentHeight,
float viewportWidth, float viewportHeight,
- float controlsOffsetYCss, float contentOffsetYCss) {
+ float controlsOffsetYCss, float contentOffsetYCss,
+ boolean hasInsertionMarker, boolean isInsertionMarkerVisible,
+ float insertionMarkerHorizontal, float insertionMarkerTop,
+ float insertionMarkerBottom) {
TraceEvent.begin("ContentViewCore:updateFrameInfo");
// Adjust contentWidth/Height to be always at least as big as
// the actual viewport (as set by onSizeChanged).
@@ -2298,6 +2301,11 @@ public class ContentViewCore
if (mBrowserAccessibilityManager != null) {
mBrowserAccessibilityManager.notifyFrameInfoInitialized();
}
+
+ mImeAdapter.onUpdateFrameInfo(mRenderCoordinates, hasInsertionMarker,
+ isInsertionMarkerVisible, insertionMarkerHorizontal, insertionMarkerTop,
+ insertionMarkerBottom);
+
TraceEvent.end("ContentViewCore:updateFrameInfo");
}
@@ -2311,6 +2319,9 @@ public class ContentViewCore
mFocusedNodeEditable = (textInputType != TextInputType.NONE);
if (!mFocusedNodeEditable) hidePastePopup();
+ mImeAdapter.updateTextAndSelection(text, selectionStart, selectionEnd, compositionStart,
+ compositionEnd);
+
mImeAdapter.updateKeyboardVisibility(
nativeImeAdapterAndroid, textInputType, textInputFlags, showImeIfNeeded);

Powered by Google App Engine
This is Rietveld 408576698