Chromium Code Reviews| 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 16ccc5948c83bfda876a1e262af632db398f45fc..f0eeccfe0dc18ce93fd0c24bb70b5505506a23ea 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 |
| @@ -2101,7 +2101,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, |
| + int frameMetadataSelectionStartType, float frameMetadataSelectionStartEdgeTopX, |
| + float frameMetadataSelectionStartEdgeTopY, |
| + float frameMetadataSelectionStartEdgeBottomY) { |
| TraceEvent.begin("ContentViewCore:updateFrameInfo"); |
| // Adjust contentWidth/Height to be always at least as big as |
| // the actual viewport (as set by onSizeChanged). |
| @@ -2167,6 +2170,18 @@ public class ContentViewCore |
| if (mBrowserAccessibilityManager != null) { |
| mBrowserAccessibilityManager.notifyFrameInfoInitialized(); |
| } |
| + |
| + if (mImeAdapter.isCursorAnchorInfoSupported()) { |
| + final float scale = mRenderCoordinates.getPageScaleFactor() |
| + * mRenderCoordinates.getDeviceScaleFactor(); |
| + final float translationX = -mRenderCoordinates.getScrollX() * scale; |
| + final float translationY = -mRenderCoordinates.getScrollY() * scale |
| + + mRenderCoordinates.getContentOffsetYPix(); |
| + mImeAdapter.onUpdateFrameInfo(scale, translationX, translationY, |
| + frameMetadataSelectionStartType, frameMetadataSelectionStartEdgeTopX, |
|
jdduke (slow)
2014/11/12 19:05:06
Should we be plumbing this data if we don't have a
yukawa
2014/12/05 07:42:19
Now the logic here is completely implemented in th
|
| + frameMetadataSelectionStartEdgeTopY, frameMetadataSelectionStartEdgeBottomY); |
| + } |
| + |
| TraceEvent.end("ContentViewCore:updateFrameInfo"); |
| } |
| @@ -2179,6 +2194,9 @@ public class ContentViewCore |
| mFocusedNodeEditable = (textInputType != ImeAdapter.getTextInputTypeNone()); |
| if (!mFocusedNodeEditable) hidePastePopup(); |
| + mImeAdapter.updateTextAndSelection(text, selectionStart, selectionEnd, compositionStart, |
| + compositionEnd); |
| + |
| mImeAdapter.updateKeyboardVisibility( |
| nativeImeAdapterAndroid, textInputType, textInputFlags, showImeIfNeeded); |