Backed out changeset 0191d92d4f42 (bug 918273) because it conflicts with bug 906877 which just landed on b2g. r=RyanVM, CLOSED TREE

This commit is contained in:
Jim Mathies 2013-10-30 16:54:50 -05:00
parent 10f67f2dba
commit 6dd4cdd81c

View File

@ -369,9 +369,6 @@ nsEventStatus AsyncPanZoomController::ReceiveInputEvent(const InputData& aEvent)
(mState == NOTHING || mState == TOUCHING || IsPanningState(mState))) {
const MultiTouchInput& multiTouchInput = aEvent.AsMultiTouchInput();
if (multiTouchInput.mType == MultiTouchInput::MULTITOUCH_START) {
// Wait for a set timeout or preventDefault info via ContentReceivedTouch
// before interacting with content. In the mean time we queue up events
// for processing later.
SetState(WAITING_LISTENERS);
}
}
@ -407,7 +404,7 @@ nsEventStatus AsyncPanZoomController::HandleInputEvent(const InputData& aEvent)
if (mDelayPanning && aEvent.mInputType == MULTITOUCH_INPUT) {
const MultiTouchInput& multiTouchInput = aEvent.AsMultiTouchInput();
if (multiTouchInput.mType == MultiTouchInput::MULTITOUCH_MOVE) {
// Wait for a set timeout or preventDefault info via ContentReceivedTouch.
// Let BrowserElementScrolling perform panning gesture first.
SetState(WAITING_LISTENERS);
mTouchQueue.AppendElement(multiTouchInput);
@ -1369,9 +1366,6 @@ void AsyncPanZoomController::UpdateCompositionBounds(const ScreenIntRect& aCompo
void AsyncPanZoomController::CancelDefaultPanZoom() {
mDisableNextTouchBatch = true;
mDelayPanning = false;
mTouchQueue.Clear();
SetState(NOTHING);
nsRefPtr<GestureEventListener> listener = GetGestureEventListener();
if (listener) {
listener->CancelGesture();
@ -1472,12 +1466,7 @@ void AsyncPanZoomController::ContentReceivedTouch(bool aPreventDefault) {
}
if (mState == WAITING_LISTENERS) {
if (aPreventDefault) {
// We're being told that this touch block will be consumed by content,
// reset state and block processing until the next touch block.
CancelDefaultPanZoom();
return;
} else {
if (!aPreventDefault) {
// Delayed scrolling gesture is pending at TOUCHING state.
if (mDelayPanning) {
SetState(TOUCHING);