| Index: content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java b/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java
|
| index 718db1632ed332fb1d255499929383050720e4aa..3a3c4202b75b3f04f2f28683665ca2b07a332989 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java
|
| @@ -12,7 +12,6 @@ import android.view.inputmethod.CursorAnchorInfo;
|
|
|
| import org.chromium.base.VisibleForTesting;
|
| import org.chromium.base.annotations.SuppressFBWarnings;
|
| -import org.chromium.content.browser.RenderCoordinates;
|
|
|
| import java.util.Arrays;
|
|
|
| @@ -144,6 +143,8 @@ final class CursorAnchorInfoController {
|
|
|
| /**
|
| * Sets coordinates system parameters and selection marker information.
|
| + * @param scale device scale factor.
|
| + * @param contentOffsetYPix Y offset below the browser controls.
|
| * @param hasInsertionMarker {@code true} if the insertion marker exists.
|
| * @param isInsertionMarkerVisible {@code true} if the insertion insertion marker is visible.
|
| * @param insertionMarkerHorizontal X coordinate of the top of the first selection marker.
|
| @@ -152,10 +153,9 @@ final class CursorAnchorInfoController {
|
| * @param view The attached view.
|
| */
|
| @SuppressFBWarnings("FE_FLOATING_POINT_EQUALITY")
|
| - public void onUpdateFrameInfo(@Nonnull RenderCoordinates renderCoordinates,
|
| - boolean hasInsertionMarker, boolean isInsertionMarkerVisible,
|
| - float insertionMarkerHorizontal, float insertionMarkerTop,
|
| - float insertionMarkerBottom, @Nonnull View view) {
|
| + public void onUpdateFrameInfo(float scale, float contentOffsetYPix, boolean hasInsertionMarker,
|
| + boolean isInsertionMarkerVisible, float insertionMarkerHorizontal,
|
| + float insertionMarkerTop, float insertionMarkerBottom, @Nonnull View view) {
|
| if (!mIsEditable) return;
|
|
|
| // Reuse {@param #mViewOrigin} to avoid object creation, as this method is supposed to be
|
| @@ -168,10 +168,8 @@ final class CursorAnchorInfoController {
|
| //
|
| // We need to prepare parameters that convert such values to physical pixels, in the
|
| // screen coordinate. Hence the following values are derived.
|
| - float scale = renderCoordinates.getDeviceScaleFactor();
|
| float translationX = mViewOrigin[0];
|
| - float translationY = mViewOrigin[1] + renderCoordinates.getContentOffsetYPix();
|
| -
|
| + float translationY = mViewOrigin[1] + contentOffsetYPix;
|
| if (!mHasCoordinateInfo
|
| || scale != mScale
|
| || translationX != mTranslationX
|
|
|