From 19ae3d2b17ae9ad8be610b04566e736618870f0e Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 28 Oct 2015 12:52:54 -0400 Subject: [PATCH] Bug 1217818 - Minor refactoring to reuse a function. r=botond --HG-- extra : commitid : 3KFxfvP88Fq --- gfx/layers/apz/util/APZEventState.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gfx/layers/apz/util/APZEventState.cpp b/gfx/layers/apz/util/APZEventState.cpp index dfd939010204..a5f93b8e77ad 100644 --- a/gfx/layers/apz/util/APZEventState.cpp +++ b/gfx/layers/apz/util/APZEventState.cpp @@ -265,14 +265,9 @@ APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent, switch (aEvent.mMessage) { case eTouchStart: { mTouchEndCancelled = false; - if (mPendingTouchPreventedResponse) { - // We can enter here if we get two TOUCH_STARTs in a row and didn't - // respond to the first one. Respond to it now. - mContentReceivedInputBlockCallback(mPendingTouchPreventedGuid, - mPendingTouchPreventedBlockId, false); - sentContentResponse = true; - mPendingTouchPreventedResponse = false; - } + sentContentResponse = SendPendingTouchPreventedResponse(false); + // sentContentResponse can be true here if we get two TOUCH_STARTs in a row + // and just responded to the first one. if (isTouchPrevented) { mContentReceivedInputBlockCallback(aGuid, aInputBlockId, isTouchPrevented); sentContentResponse = true;