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

--HG--
extra : source : 5857a51daa23da0090b92467cc7fe5c23354b981
This commit is contained in:
Botond Ballo 2015-02-09 18:20:15 -05:00
parent 65a2a78c03
commit 3d67dfb02e
5 changed files with 32 additions and 2 deletions

View file

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

View file

@ -170,6 +170,16 @@ APZEventState::ProcessLongTap(const nsCOMPtr<nsIDOMWindowUtils>& aUtils,
mContentReceivedInputBlockCallback->Run(aGuid, aInputBlockId, eventHandled); 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 void
APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent, APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
const ScrollableLayerGuid& aGuid, const ScrollableLayerGuid& aGuid,

View file

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

View file

@ -160,6 +160,21 @@ ChromeProcessController::HandleLongTap(const mozilla::CSSPoint& aPoint, int32_t
aInputBlockId, GetPresShellResolution()); 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 void
ChromeProcessController::NotifyAPZStateChange(const ScrollableLayerGuid& aGuid, ChromeProcessController::NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
APZStateChange aChange, APZStateChange aChange,

View file

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