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

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

Issue 1589953005: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Findbugs warning / Simplify the state transition. Created 4 years, 10 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 e6eb23a536823ecf8c691e22078af60c14dc27e6..6c56a049c4f7c96236eb5d86f57bbfef138f8682 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
@@ -2291,7 +2291,10 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
float contentWidth, float contentHeight,
float viewportWidth, float viewportHeight,
float controlsOffsetYCss, float contentOffsetYCss,
- boolean isMobileOptimizedHint) {
+ boolean isMobileOptimizedHint,
+ boolean hasInsertionMarker, boolean isInsertionMarkerVisible,
+ float insertionMarkerHorizontal, float insertionMarkerTop,
+ float insertionMarkerBottom) {
TraceEvent.begin("ContentViewCore:updateFrameInfo");
mIsMobileOptimizedHint = isMobileOptimizedHint;
// Adjust contentWidth/Height to be always at least as big as
@@ -2358,6 +2361,11 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
if (mBrowserAccessibilityManager != null) {
mBrowserAccessibilityManager.notifyFrameInfoInitialized();
}
+
+ mImeAdapter.onUpdateFrameInfo(mRenderCoordinates, hasInsertionMarker,
+ isInsertionMarkerVisible, insertionMarkerHorizontal, insertionMarkerTop,
+ insertionMarkerBottom);
+
TraceEvent.end("ContentViewCore:updateFrameInfo");
}
@@ -2373,6 +2381,8 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
if (!focusedNodeEditable) hidePastePopup();
mImeAdapter.attach(nativeImeAdapterAndroid);
+ mImeAdapter.updateTextAndSelection(text, selectionStart, selectionEnd, compositionStart,
+ compositionEnd);
mImeAdapter.updateKeyboardVisibility(
textInputType, textInputFlags, showImeIfNeeded);
mImeAdapter.updateState(text, selectionStart, selectionEnd, compositionStart,

Powered by Google App Engine
This is Rietveld 408576698