Skip to content

Commit 91901ae

Browse files
George MountAndroid (Google) Code Review
authored andcommitted
Merge "Fix flicker while selecting text." into jb-dev
2 parents 8ccfbdd + 8072976 commit 91901ae

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6381,10 +6381,14 @@ private void snapDraggingCursor() {
63816381
mSelectDraggingTextQuad.p4.x, mSelectDraggingTextQuad.p3.x);
63826382
float newY = scaleCoordinate(scale,
63836383
mSelectDraggingTextQuad.p4.y, mSelectDraggingTextQuad.p3.y);
6384-
int x = Math.max(mEditTextContentBounds.left,
6385-
Math.min(mEditTextContentBounds.right, Math.round(newX)));
6386-
int y = Math.max(mEditTextContentBounds.top,
6387-
Math.min(mEditTextContentBounds.bottom, Math.round(newY)));
6384+
int x = Math.round(newX);
6385+
int y = Math.round(newY);
6386+
if (mIsEditingText) {
6387+
x = Math.max(mEditTextContentBounds.left,
6388+
Math.min(mEditTextContentBounds.right, x));
6389+
y = Math.max(mEditTextContentBounds.top,
6390+
Math.min(mEditTextContentBounds.bottom, y));
6391+
}
63886392
mSelectDraggingCursor.set(x, y);
63896393
}
63906394

0 commit comments

Comments
 (0)