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

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

Issue 2826303003: Let selection events bypass ContentViewCore (Closed)
Patch Set: fix tests Created 3 years, 8 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 68d484b08d3fa8644d8b3d7f837068f86a9549ff..b1a9e86b5ad20cb403d41ee882ecedca0230f67f 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
@@ -826,13 +826,14 @@ public class ContentViewCore
private void setTouchScrollInProgress(boolean inProgress) {
if (mTouchScrollInProgress == inProgress) return;
mTouchScrollInProgress = inProgress;
- mSelectionPopupController.hideActionMode(inProgress);
+ mSelectionPopupController.setTouchScrollInProgress(inProgress);
}
@SuppressWarnings("unused")
@CalledByNative
private void onFlingStartEventConsumed() {
mPotentiallyActiveFlingCount++;
+ mSelectionPopupController.setIsFlinging(true);
setTouchScrollInProgress(false);
for (mGestureStateListenersIterator.rewind();
mGestureStateListenersIterator.hasNext();) {
@@ -1584,13 +1585,6 @@ public class ContentViewCore
mPreserveSelectionOnNextLossOfFocus = true;
}
- @CalledByNative
- private void onSelectionEvent(
- int eventType, int xAnchor, int yAnchor, int left, int top, int right, int bottom) {
- mSelectionPopupController.onSelectionEvent(eventType, xAnchor, yAnchor,
- left, top, right, bottom, isScrollInProgress(), mTouchScrollInProgress);
- }
-
private void setTextHandlesTemporarilyHidden(boolean hide) {
if (mNativeContentViewCore == 0) return;
nativeSetTextHandlesTemporarilyHidden(mNativeContentViewCore, hide);
@@ -1772,12 +1766,6 @@ public class ContentViewCore
@SuppressWarnings("unused")
@CalledByNative
- private void onSelectionChanged(String text) {
- mSelectionPopupController.onSelectionChanged(text);
- }
-
- @SuppressWarnings("unused")
- @CalledByNative
private void performLongPressHapticFeedback() {
mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
}
@@ -2352,6 +2340,7 @@ public class ContentViewCore
final int potentiallyActiveFlingCount = mPotentiallyActiveFlingCount;
setTouchScrollInProgress(false);
+ mSelectionPopupController.setIsFlinging(false);
mPotentiallyActiveFlingCount = 0;
if (touchScrollInProgress) updateGestureStateListener(GestureEventType.SCROLL_END);
if (potentiallyActiveFlingCount > 0) updateGestureStateListener(GestureEventType.FLING_END);
@@ -2364,6 +2353,7 @@ public class ContentViewCore
setTouchScrollInProgress(false);
if (mPotentiallyActiveFlingCount <= 0) return;
mPotentiallyActiveFlingCount--;
+ if (mPotentiallyActiveFlingCount == 0) mSelectionPopupController.setIsFlinging(false);
updateGestureStateListener(GestureEventType.FLING_END);
}

Powered by Google App Engine
This is Rietveld 408576698