Skip to content
This repository has been archived by the owner on Jul 3, 2018. It is now read-only.

Commit

Permalink
Bug 1127066 - Implement ChromeProcessController::HandleLongTapUp(). r…
Browse files Browse the repository at this point in the history
…=kats

--HG--
extra : source : 5857a51daa23da0090b92467cc7fe5c23354b981
  • Loading branch information
theres-waldo committed Feb 9, 2015
1 parent 65a2a78 commit 3d67dfb
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dom/ipc/TabChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
10 changes: 10 additions & 0 deletions gfx/layers/apz/util/APZEventState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions gfx/layers/apz/util/APZEventState.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class APZEventState {
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);
Expand Down
15 changes: 15 additions & 0 deletions gfx/layers/apz/util/ChromeProcessController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/apz/util/ChromeProcessController.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ChromeProcessController : public mozilla::layers::GeckoContentController
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,
Expand Down

0 comments on commit 3d67dfb

Please sign in to comment.