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

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

Issue 12228005: Pass is_anchor_first with SelectionBounds_Params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 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
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a6441ffe1b9b3e815d151d82a2d571825c0ef59c..b3e43ac99cd9efcb4d7f6fa208af6f0087ef0a55 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
@@ -1981,21 +1981,27 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
@SuppressWarnings("unused")
@CalledByNative
- private void onSelectionBoundsChanged(Rect startRect, int dir1, Rect endRect, int dir2) {
- int x1 = startRect.left;
- int y1 = startRect.bottom;
- int x2 = endRect.left;
- int y2 = endRect.bottom;
+ private void onSelectionBoundsChanged(Rect anchorRect, int anchorDir, Rect focusRect,
+ int focusDir, boolean isAnchorFirst) {
+ int x1 = anchorRect.left;
+ int y1 = anchorRect.bottom;
+ int x2 = focusRect.left;
+ int y2 = focusRect.bottom;
if (x1 != x2 || y1 != y2 ||
(mSelectionHandleController != null && mSelectionHandleController.isDragging())) {
if (mInsertionHandleController != null) {
mInsertionHandleController.hide();
}
- mStartHandlePoint.setWindow(x1, y1);
- mEndHandlePoint.setWindow(x2, y2);
+ if (isAnchorFirst) {
+ mStartHandlePoint.setWindow(x1, y1);
+ mEndHandlePoint.setWindow(x2, y2);
+ } else {
+ mStartHandlePoint.setWindow(x2, y2);
+ mEndHandlePoint.setWindow(x1, y1);
+ }
- getSelectionHandleController().onSelectionChanged(dir1, dir2);
+ getSelectionHandleController().onSelectionChanged(anchorDir, focusDir);
updateHandleScreenPositions();
mHasSelection = true;
} else {
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698