Bug 1127066 - Implement ChromeProcessController::HandleLongTapUp(). r=kats

This commit is contained in:
Botond Ballo 2015-02-09 18:20:15 -05:00
parent fb168b0778
commit 4057ba6fbb
5 changed files with 32 additions and 2 deletions

View File

@ -2102,7 +2102,9 @@ TabChild::RecvHandleLongTap(const CSSPoint& aPoint, const ScrollableLayerGuid& a
bool
TabChild::RecvHandleLongTapUp(const CSSPoint& aPoint, const ScrollableLayerGuid& aGuid)
{
RecvHandleSingleTap(aPoint, aGuid);
if (mGlobal && mTabChildGlobal) {
mAPZEventState->ProcessLongTapUp(aPoint, aGuid, GetPresShellResolution());
}
return true;
}

View File

@ -170,6 +170,16 @@ APZEventState::ProcessLongTap(const nsCOMPtr<nsIDOMWindowUtils>& aUtils,
mContentReceivedInputBlockCallback->Run(aGuid, aInputBlockId, eventHandled);
}
void
APZEventState::ProcessLongTapUp(const CSSPoint& aPoint,
const ScrollableLayerGuid& aGuid,
float aPresShellResolution)
{
APZES_LOG("Handling long tap up at %s\n", Stringify(aPoint).c_str());
ProcessSingleTap(aPoint, aGuid, aPresShellResolution);
}
void
APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
const ScrollableLayerGuid& aGuid,

View File

@ -57,6 +57,9 @@ public:
const ScrollableLayerGuid& aGuid,
uint64_t aInputBlockId,
float aPresShellResolution);
void ProcessLongTapUp(const CSSPoint& aPoint,
const ScrollableLayerGuid& aGuid,
float aPresShellResolution);
void ProcessTouchEvent(const WidgetTouchEvent& aEvent,
const ScrollableLayerGuid& aGuid,
uint64_t aInputBlockId);

View File

@ -160,6 +160,21 @@ ChromeProcessController::HandleLongTap(const mozilla::CSSPoint& aPoint, int32_t
aInputBlockId, GetPresShellResolution());
}
void
ChromeProcessController::HandleLongTapUp(const CSSPoint& aPoint, int32_t aModifiers,
const ScrollableLayerGuid& aGuid)
{
if (MessageLoop::current() != mUILoop) {
mUILoop->PostTask(
FROM_HERE,
NewRunnableMethod(this, &ChromeProcessController::HandleLongTapUp,
aPoint, aModifiers, aGuid));
return;
}
mAPZEventState->ProcessLongTapUp(aPoint, aGuid, GetPresShellResolution());
}
void
ChromeProcessController::NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
APZStateChange aChange,

View File

@ -48,7 +48,7 @@ public:
const ScrollableLayerGuid& aGuid,
uint64_t aInputBlockId) MOZ_OVERRIDE;
virtual void HandleLongTapUp(const CSSPoint& aPoint, int32_t aModifiers,
const ScrollableLayerGuid& aGuid) MOZ_OVERRIDE {}
const ScrollableLayerGuid& aGuid) MOZ_OVERRIDE;
virtual void SendAsyncScrollDOMEvent(bool aIsRoot, const mozilla::CSSRect &aContentRect,
const mozilla::CSSSize &aScrollableSize) MOZ_OVERRIDE {}
virtual void NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,