-
Mario Bianucci authored
Pinch zoom was incorrectly not being preventDefault'd sometimes, in two different scenarios: either the transition from scroll->pinch, or from fling->pinch. In both cases, events were being queued in the TouchpadPinchEventQueue, then TouchpadPinchEventQueue::ProcessMouseWheelAck was receiving ACKs, which TPEQ assumed were the ACKs for the events that it had already queued. While this is often true, it was not always the case. Sometimes, the event ACKs from the scroll or fling would arrive after the pinch events had been queued already, in which case the ACKs would be processed as if they were for pinch events, when they weren't. This resulted in the pinch zoom not always being preventDefault'd. This CL fixes this by checking the event that was being ACK'd vs the event that TPEQ expects an ACK for, and if they don't match then it early outs and ignores the ACK. Bug: 908758 Change-Id: Ifbad8e3ae46947c75b4680dc516398b69cf2cc89 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1725349 Commit-Queue: Mario Bianucci <mabian@microsoft.com> Reviewed-by:
David Bokan <bokan@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#688161}
2c921b01