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

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

Issue 278923003: Revert of Android-side of insertion/selection handles visibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
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 bcd1e9b2da7eb0c4b0142e2cd605e2d6dafdd608..1e2073022916117bbd87a6891718301a741791f9 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
@@ -357,11 +357,6 @@
private final RenderCoordinates.NormalizedPoint mEndHandlePoint;
private final RenderCoordinates.NormalizedPoint mInsertionHandlePoint;
- // Cached copy of the visible rectangle defined by two points. Needed to determine
- // visibility of insertion/selection handles.
- private final RenderCoordinates.NormalizedPoint mTopLeftVisibilityClippingPoint;
- private final RenderCoordinates.NormalizedPoint mBottomRightVisibilityClippingPoint;
-
// Tracks whether a selection is currently active. When applied to selected text, indicates
// whether the last selected text is still highlighted.
private boolean mHasSelection;
@@ -460,8 +455,6 @@
mStartHandlePoint = mRenderCoordinates.createNormalizedPoint();
mEndHandlePoint = mRenderCoordinates.createNormalizedPoint();
mInsertionHandlePoint = mRenderCoordinates.createNormalizedPoint();
- mTopLeftVisibilityClippingPoint = mRenderCoordinates.createNormalizedPoint();
- mBottomRightVisibilityClippingPoint = mRenderCoordinates.createNormalizedPoint();
mAccessibilityManager = (AccessibilityManager)
getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
mGestureStateListeners = new ObserverList<GestureStateListener>();
@@ -1989,7 +1982,6 @@
};
mSelectionHandleController.hideAndDisallowAutomaticShowing();
- updateInsertionSelectionVisibleBounds();
}
return mSelectionHandleController;
@@ -2028,7 +2020,6 @@
};
mInsertionHandleController.hideAndDisallowAutomaticShowing();
- updateInsertionSelectionVisibleBounds();
}
return mInsertionHandleController;
@@ -2514,32 +2505,6 @@
}
if (isSelectionHandleShowing() || isInsertionHandleShowing()) {
mPositionObserver.addListener(mPositionListener);
- }
- }
-
- @CalledByNative
- private void setSelectionRootBounds(Rect bounds) {
- mTopLeftVisibilityClippingPoint.setLocalDip(bounds.left, bounds.top);
- mBottomRightVisibilityClippingPoint.setLocalDip(bounds.right, bounds.bottom);
- updateInsertionSelectionVisibleBounds();
- }
-
- private void updateInsertionSelectionVisibleBounds() {
- if (mSelectionHandleController == null && mInsertionHandleController == null) {
- return;
- }
-
- int x1 = Math.round(mTopLeftVisibilityClippingPoint.getXPix());
- int y1 = Math.round(mTopLeftVisibilityClippingPoint.getYPix());
- int x2 = Math.round(mBottomRightVisibilityClippingPoint.getXPix());
- int y2 = Math.round(mBottomRightVisibilityClippingPoint.getYPix());
-
- if (mSelectionHandleController != null) {
- mSelectionHandleController.setVisibleClippingRectangle(x1, y1, x2, y2);
- }
-
- if (mInsertionHandleController != null) {
- mInsertionHandleController.setVisibleClippingRectangle(x1, y1, x2, y2);
}
}

Powered by Google App Engine
This is Rietveld 408576698