Commit 4606d42f authored by jdduke@chromium.org's avatar jdduke@chromium.org

Revert of [Android] Provide unhandled tap event notifications...

Revert of [Android] Provide unhandled tap event notifications (https://codereview.chromium.org/218633008/)

Reason for revert:
Legitimate browsertest failure.

Original issue's description:
> [Android] Provide unhandled tap event notifications
> 
> Allow notifications of unhandled taps via the GestureStateListener.  This change
> makes GestureTap events blocking, but there are several use-cases for which this
> will be necessary, e.g., WebView and contextual search.
> 
> NOTRY=true
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261431

TBR=mkosiba@chromium.org,donnd@chromium.org,tedchoc@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/224273002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261470 0039d316-1c4b-4281-b951-d872f2087c98
parent 67832d7b
......@@ -615,12 +615,6 @@ void ContentViewCoreImpl::OnGestureEventAck(const blink::WebGestureEvent& event,
case WebInputEvent::GesturePinchEnd:
Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj());
break;
case WebInputEvent::GestureTap:
if (ack_result != INPUT_EVENT_ACK_STATE_CONSUMED) {
Java_ContentViewCore_onTapEventNotConsumed(
env, j_obj.obj(), event.x * dpi_scale(), event.y * dpi_scale());
}
break;
case WebInputEvent::GestureDoubleTap:
Java_ContentViewCore_onDoubleTapEventAck(env, j_obj.obj());
break;
......
......@@ -1285,17 +1285,12 @@ TEST_F(InputRouterImplTest, DoubleTapGestureDependsOnFirstTap) {
EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
// The GestureTapUnconfirmed is converted into a tap, as the touch action is
// none.
// auto.
SimulateGestureEvent(WebInputEvent::GestureTapUnconfirmed,
WebGestureEvent::Touchscreen);
EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
// This test will become invalid if GestureTap stops requiring an ack.
ASSERT_TRUE(!WebInputEventTraits::IgnoresAckDisposition(
WebInputEvent::GestureTap));
EXPECT_EQ(2, client_->in_flight_event_count());
SendInputEventACK(WebInputEvent::GestureTap,
INPUT_EVENT_ACK_STATE_CONSUMED);
EXPECT_EQ(1, client_->in_flight_event_count());
EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
// This tap gesture is dropped, since the GestureTapUnconfirmed was turned
// into a tap.
......@@ -1317,10 +1312,8 @@ TEST_F(InputRouterImplTest, DoubleTapGestureDependsOnFirstTap) {
SimulateGestureEvent(WebInputEvent::GestureDoubleTap,
WebGestureEvent::Touchscreen);
// This test will become invalid if GestureDoubleTap stops requiring an ack.
ASSERT_TRUE(!WebInputEventTraits::IgnoresAckDisposition(
DCHECK(!WebInputEventTraits::IgnoresAckDisposition(
WebInputEvent::GestureDoubleTap));
EXPECT_EQ(1, client_->in_flight_event_count());
SendInputEventACK(WebInputEvent::GestureTap, INPUT_EVENT_ACK_STATE_CONSUMED);
EXPECT_EQ(0, client_->in_flight_event_count());
}
......
......@@ -322,6 +322,7 @@ bool WebInputEventTraits::IgnoresAckDisposition(
case WebInputEvent::GestureTapDown:
case WebInputEvent::GestureShowPress:
case WebInputEvent::GestureTapCancel:
case WebInputEvent::GestureTap:
case WebInputEvent::GesturePinchBegin:
case WebInputEvent::GesturePinchEnd:
case WebInputEvent::GestureScrollBegin:
......
......@@ -1286,15 +1286,6 @@ public class ContentViewCore
updateGestureStateListener(GestureEventType.PINCH_END);
}
@SuppressWarnings("unused")
@CalledByNative
private void onTapEventNotConsumed(int x, int y) {
for (mGestureStateListenersIterator.rewind();
mGestureStateListenersIterator.hasNext();) {
mGestureStateListenersIterator.next().onUnhandledTapEvent(x, y);
}
}
@SuppressWarnings("unused")
@CalledByNative
private void onDoubleTapEventAck() {
......
......@@ -61,9 +61,4 @@ public class GestureStateListener {
* Called when the scroll offsets or extents may have changed.
*/
public void onScrollOffsetOrExtentChanged(int scrollOffsetY, int scrollExtentY) {}
/*
* Called when a tap event was not handled by the renderer.
*/
public void onUnhandledTapEvent(int x, int y) {}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment