зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1005815 - Basic implementation of ChromeProcessController::HandleSingleTap. r=kats
This commit is contained in:
Родитель
fe4c9e99d2
Коммит
5560fcf705
|
@ -97,3 +97,31 @@ ChromeProcessController::Destroy()
|
|||
MOZ_ASSERT(MessageLoop::current() == mUILoop);
|
||||
mWidget = nullptr;
|
||||
}
|
||||
|
||||
float
|
||||
ChromeProcessController::GetPresShellResolution() const
|
||||
{
|
||||
// The document in the chrome process cannot be zoomed, so its pres shell
|
||||
// resolution is 1.
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
void
|
||||
ChromeProcessController::HandleSingleTap(const CSSPoint& aPoint,
|
||||
int32_t aModifiers,
|
||||
const ScrollableLayerGuid& aGuid)
|
||||
{
|
||||
if (MessageLoop::current() != mUILoop) {
|
||||
mUILoop->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableMethod(this, &ChromeProcessController::HandleSingleTap,
|
||||
aPoint, aModifiers, aGuid));
|
||||
return;
|
||||
}
|
||||
|
||||
LayoutDevicePoint point =
|
||||
APZCCallbackHelper::ApplyCallbackTransform(aPoint, aGuid, GetPresShellResolution())
|
||||
* mWidget->GetDefaultScale();
|
||||
|
||||
APZCCallbackHelper::FireSingleTapEvent(point, mWidget);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
virtual void HandleDoubleTap(const mozilla::CSSPoint& aPoint, int32_t aModifiers,
|
||||
const ScrollableLayerGuid& aGuid) MOZ_OVERRIDE {}
|
||||
virtual void HandleSingleTap(const mozilla::CSSPoint& aPoint, int32_t aModifiers,
|
||||
const ScrollableLayerGuid& aGuid) MOZ_OVERRIDE {}
|
||||
const ScrollableLayerGuid& aGuid) MOZ_OVERRIDE;
|
||||
virtual void HandleLongTap(const mozilla::CSSPoint& aPoint, int32_t aModifiers,
|
||||
const ScrollableLayerGuid& aGuid,
|
||||
uint64_t aInputBlockId) MOZ_OVERRIDE {}
|
||||
|
@ -52,6 +52,7 @@ private:
|
|||
MessageLoop* mUILoop;
|
||||
|
||||
void InitializeRoot();
|
||||
float GetPresShellResolution() const;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
Загрузка…
Ссылка в новой задаче