Closed Bug 1816467 Opened 3 years ago Closed 2 years ago

Remove eEndTouch APZStateChange message

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: dlrobertson, Unassigned)

References

Details

The APZStateChane::eEndTouch message is only used to clear the mCanBePan flag of the ActiveElementManager in ActiveElementManager::HandleTouchEnd. We do not need a state change event from APZ to know when this happens. In APZEventState::ProcessTouchEvent we are informed that a touch-end has occurred, and the EventState has a reference to the ActiveElementManager here.

It's also used to set the mTouchEndIsClick flag here, which I think is its more important function.

That said, there is something suspicious about how this currently works: the mTouchEndIsClick flag is set by the eEndTouch message, but it's read when the touch-end event itself is received here. That seems to assume the touch-end event will be received after the eEndTouch, but I don't think that assumption is valid: the touch-end event is sent to content as soon it arrives at APZ (at the time the event is enqueued into the InputQueue), while the state change notification is only sent once the event is processed (at the time the event is dequeued from the InputQueue). In the case where the event spends time waiting for a content response in the InputQueue, it seems therefore that mTouchEndIsClick could be read before the correct value is set.

For this reason, I think a correct solution here (including fixing the above which may already be broken) would involve setting the equivalent of the mEndTouchIsClick flag on the touch-end event itself (which in turn would require computing its value at enqueue time).

Severity: -- → S3
Priority: -- → P3
Depends on: 1806400

(In reply to Botond Ballo [:botond] from comment #1)

For this reason, I think a correct solution here (including fixing the above which may already be broken) would involve setting the equivalent of the mEndTouchIsClick flag on the touch-end event itself (which in turn would require computing its value at enqueue time).

This was done by https://hg.mozilla.org/integration/autoland/rev/fc2f50e49e2a in bug 1806400.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
You need to log in before you can comment on or make changes to this bug.