зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1105109 - Have APZCTreeManager keep track of the current mouse position. r=kats
MozReview-Commit-ID: 7o80O8rpdNS --HG-- extra : rebase_source : c775d1d2f245878e10774e41b58d550eabb77d18
This commit is contained in:
Родитель
e55c77c020
Коммит
e3ca66d639
|
@ -986,6 +986,8 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
|
||||||
MouseInput& mouseInput = aEvent.AsMouseInput();
|
MouseInput& mouseInput = aEvent.AsMouseInput();
|
||||||
mouseInput.mHandledByAPZ = true;
|
mouseInput.mHandledByAPZ = true;
|
||||||
|
|
||||||
|
mCurrentMousePosition = mouseInput.mOrigin;
|
||||||
|
|
||||||
bool startsDrag = DragTracker::StartsDrag(mouseInput);
|
bool startsDrag = DragTracker::StartsDrag(mouseInput);
|
||||||
if (startsDrag) {
|
if (startsDrag) {
|
||||||
// If this is the start of a drag we need to unambiguously know if it's
|
// If this is the start of a drag we need to unambiguously know if it's
|
||||||
|
@ -2478,6 +2480,12 @@ APZCTreeManager::GetApzcToGeckoTransform(const AsyncPanZoomController *aApzc) co
|
||||||
return ViewAs<ParentLayerToScreenMatrix4x4>(result);
|
return ViewAs<ParentLayerToScreenMatrix4x4>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScreenPoint
|
||||||
|
APZCTreeManager::GetCurrentMousePosition() const
|
||||||
|
{
|
||||||
|
return mCurrentMousePosition;
|
||||||
|
}
|
||||||
|
|
||||||
already_AddRefed<AsyncPanZoomController>
|
already_AddRefed<AsyncPanZoomController>
|
||||||
APZCTreeManager::GetMultitouchTarget(AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const
|
APZCTreeManager::GetMultitouchTarget(AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -485,6 +485,7 @@ public:
|
||||||
const FrameMetrics::ViewID& aScrollId);
|
const FrameMetrics::ViewID& aScrollId);
|
||||||
ScreenToParentLayerMatrix4x4 GetScreenToApzcTransform(const AsyncPanZoomController *aApzc) const;
|
ScreenToParentLayerMatrix4x4 GetScreenToApzcTransform(const AsyncPanZoomController *aApzc) const;
|
||||||
ParentLayerToScreenMatrix4x4 GetApzcToGeckoTransform(const AsyncPanZoomController *aApzc) const;
|
ParentLayerToScreenMatrix4x4 GetApzcToGeckoTransform(const AsyncPanZoomController *aApzc) const;
|
||||||
|
ScreenPoint GetCurrentMousePosition() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process touch velocity.
|
* Process touch velocity.
|
||||||
|
@ -597,6 +598,9 @@ private:
|
||||||
/* Tracks the number of touch points we are tracking that are currently on
|
/* Tracks the number of touch points we are tracking that are currently on
|
||||||
* the screen. */
|
* the screen. */
|
||||||
TouchCounter mTouchCounter;
|
TouchCounter mTouchCounter;
|
||||||
|
/* Stores the current mouse position in screen coordinates.
|
||||||
|
*/
|
||||||
|
ScreenPoint mCurrentMousePosition;
|
||||||
/* For logging the APZC tree for debugging (enabled by the apz.printtree
|
/* For logging the APZC tree for debugging (enabled by the apz.printtree
|
||||||
* pref). */
|
* pref). */
|
||||||
gfx::TreeLog mApzcTreeLog;
|
gfx::TreeLog mApzcTreeLog;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче