mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1193930 - Allow the user to start a pinch while an overscroll animation is still in progress. r=kats
This commit is contained in:
parent
f1d325cb3b
commit
b2f0d74a1a
@ -716,11 +716,14 @@ APZCTreeManager::ProcessTouchInput(MultiTouchInput& aInput,
|
||||
uint64_t* aOutInputBlockId)
|
||||
{
|
||||
if (aInput.mType == MultiTouchInput::MULTITOUCH_START) {
|
||||
// If we are in an overscrolled state and a second finger goes down,
|
||||
// If we are panned into overscroll and a second finger goes down,
|
||||
// ignore that second touch point completely. The touch-start for it is
|
||||
// dropped completely; subsequent touch events until the touch-end for it
|
||||
// will have this touch point filtered out.
|
||||
if (mApzcForInputBlock && BuildOverscrollHandoffChain(mApzcForInputBlock)->HasOverscrolledApzc()) {
|
||||
// (By contrast, if we're in overscroll but not panning, such as after
|
||||
// putting two fingers down during an overscroll animation, we process the
|
||||
// second touch and proceed to pinch.)
|
||||
if (mApzcForInputBlock && BuildOverscrollHandoffChain(mApzcForInputBlock)->HasApzcPannedIntoOverscroll()) {
|
||||
if (mRetainedTouchIdentifier == -1) {
|
||||
mRetainedTouchIdentifier = mApzcForInputBlock->GetLastTouchIdentifier();
|
||||
}
|
||||
|
@ -1042,6 +1042,10 @@ public:
|
||||
return mX.IsOverscrolled() || mY.IsOverscrolled();
|
||||
}
|
||||
|
||||
bool IsPannedIntoOverscroll() const {
|
||||
return IsOverscrolled() && IsInPanningState();
|
||||
}
|
||||
|
||||
private:
|
||||
/* This is the cumulative CSS transform for all the layers from (and including)
|
||||
* the parent APZC down to (but excluding) this one. */
|
||||
|
@ -162,9 +162,9 @@ OverscrollHandoffChain::CanScrollInDirection(const AsyncPanZoomController* aApzc
|
||||
}
|
||||
|
||||
bool
|
||||
OverscrollHandoffChain::HasOverscrolledApzc() const
|
||||
OverscrollHandoffChain::HasApzcPannedIntoOverscroll() const
|
||||
{
|
||||
return AnyApzc(&AsyncPanZoomController::IsOverscrolled);
|
||||
return AnyApzc(&AsyncPanZoomController::IsPannedIntoOverscroll);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -80,8 +80,8 @@ public:
|
||||
bool CanScrollInDirection(const AsyncPanZoomController* aApzc,
|
||||
Layer::ScrollDirection aDirection) const;
|
||||
|
||||
// Determine whether any APZC along this handoff chain is overscrolled.
|
||||
bool HasOverscrolledApzc() const;
|
||||
// Determine whether any APZC along this handoff chain is panned into overscroll.
|
||||
bool HasApzcPannedIntoOverscroll() const;
|
||||
|
||||
// Determine whether any APZC along this handoff chain has been flung fast.
|
||||
bool HasFastFlungApzc() const;
|
||||
|
Loading…
Reference in New Issue
Block a user