Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91901aeb authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Fix flicker while selecting text." into jb-dev

parents 8ccfbddd 8072976d
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -6381,10 +6381,14 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
                mSelectDraggingTextQuad.p4.x, mSelectDraggingTextQuad.p3.x);
        float newY = scaleCoordinate(scale,
                mSelectDraggingTextQuad.p4.y, mSelectDraggingTextQuad.p3.y);
        int x = Math.max(mEditTextContentBounds.left,
                    Math.min(mEditTextContentBounds.right, Math.round(newX)));
        int y = Math.max(mEditTextContentBounds.top,
                    Math.min(mEditTextContentBounds.bottom, Math.round(newY)));
        int x = Math.round(newX);
        int y = Math.round(newY);
        if (mIsEditingText) {
            x = Math.max(mEditTextContentBounds.left,
                    Math.min(mEditTextContentBounds.right, x));
            y = Math.max(mEditTextContentBounds.top,
                    Math.min(mEditTextContentBounds.bottom, y));
        }
        mSelectDraggingCursor.set(x, y);
    }