mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 869940 - Implement pan start/end notifications from APZC. r=kats
This commit is contained in:
parent
5b157af303
commit
98b679c2f8
@ -1378,9 +1378,24 @@ void AsyncPanZoomController::ContentReceivedTouch(bool aPreventDefault) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncPanZoomController::SetState(PanZoomState aState) {
|
void AsyncPanZoomController::SetState(PanZoomState aNewState) {
|
||||||
|
|
||||||
|
PanZoomState oldState;
|
||||||
|
|
||||||
|
// Intentional scoping for mutex
|
||||||
|
{
|
||||||
MonitorAutoLock monitor(mMonitor);
|
MonitorAutoLock monitor(mMonitor);
|
||||||
mState = aState;
|
oldState = mState;
|
||||||
|
mState = aNewState;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mGeckoContentController) {
|
||||||
|
if (oldState == PANNING && aNewState != PANNING) {
|
||||||
|
mGeckoContentController->HandlePanEnd();
|
||||||
|
} else if (oldState != PANNING && aNewState == PANNING) {
|
||||||
|
mGeckoContentController->HandlePanBegin();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncPanZoomController::TimeoutTouchListeners() {
|
void AsyncPanZoomController::TimeoutTouchListeners() {
|
||||||
|
@ -60,6 +60,17 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual void PostDelayedTask(Task* aTask, int aDelayMs) = 0;
|
virtual void PostDelayedTask(Task* aTask, int aDelayMs) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request any special actions be performed when panning starts
|
||||||
|
*/
|
||||||
|
virtual void HandlePanBegin() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request any special actions be performed when panning ends
|
||||||
|
*/
|
||||||
|
virtual void HandlePanEnd() {}
|
||||||
|
|
||||||
GeckoContentController() {}
|
GeckoContentController() {}
|
||||||
virtual ~GeckoContentController() {}
|
virtual ~GeckoContentController() {}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user