mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 998025 - Have APZ gtests clear the overscroll handoff chain when appropriate. r=kats
--HG-- extra : rebase_source : 8253d35c2e0c610398c6b0d3f812552d0a09c246
This commit is contained in:
parent
52afa7c8d1
commit
b7850d11ba
@ -303,6 +303,11 @@ protected:
|
||||
* Build the chain of APZCs that will handle overscroll for a pan starting at |aInitialTarget|.
|
||||
*/
|
||||
void BuildOverscrollHandoffChain(const nsRefPtr<AsyncPanZoomController>& aInitialTarget);
|
||||
|
||||
/*
|
||||
* Clear the handoff chain built in BuildOverscrollHandoffChain().
|
||||
*/
|
||||
void ClearOverscrollHandoffChain();
|
||||
public:
|
||||
/* Some helper functions to find an APZC given some identifying input. These functions
|
||||
lock the tree of APZCs while they find the right one, and then return an addref'd
|
||||
@ -332,7 +337,6 @@ private:
|
||||
ScrollableLayerGuid* aOutTargetGuid);
|
||||
void UpdateZoomConstraintsRecursively(AsyncPanZoomController* aApzc,
|
||||
const ZoomConstraints& aConstraints);
|
||||
void ClearOverscrollHandoffChain();
|
||||
|
||||
/**
|
||||
* Recursive helper function to build the APZC tree. The tree of APZC instances has
|
||||
|
@ -143,10 +143,13 @@ public:
|
||||
|
||||
class TestAPZCTreeManager : public APZCTreeManager {
|
||||
public:
|
||||
// Expose this so test code can call it directly.
|
||||
// Expose these so test code can call it directly.
|
||||
void BuildOverscrollHandoffChain(AsyncPanZoomController* aApzc) {
|
||||
APZCTreeManager::BuildOverscrollHandoffChain(aApzc);
|
||||
}
|
||||
void ClearOverscrollHandoffChain() {
|
||||
APZCTreeManager::ClearOverscrollHandoffChain();
|
||||
}
|
||||
};
|
||||
|
||||
static
|
||||
@ -235,6 +238,10 @@ void ApzcPan(AsyncPanZoomController* apzc,
|
||||
aTime += TIME_BETWEEN_TOUCH_EVENT;
|
||||
mti.mTouches.AppendElement(SingleTouchData(0, ScreenIntPoint(10, aTouchEndY), ScreenSize(0, 0), 0, 0));
|
||||
status = apzc->ReceiveInputEvent(mti);
|
||||
|
||||
// Since we've explicitly built the overscroll handoff chain before
|
||||
// touch-start, we need to explicitly clear it after touch-end.
|
||||
aTreeManager->ClearOverscrollHandoffChain();
|
||||
}
|
||||
|
||||
static
|
||||
|
Loading…
Reference in New Issue
Block a user