Bug 1683426. Assert in DManipEventHandler::OnContentUpdated that SendPinch returns true if mShouldSendPinchStart is true. r=botond

Otherwise we wouldn't send a pinch start. This should never be hit because if we get here the current scale should not be fuzzy equal to the previous scale so SendPinch should compute a non-zero deltaY and send an event and return true.

Differential Revision: https://phabricator.services.mozilla.com/D100170
This commit is contained in:
Timothy Nikkel 2020-12-18 22:20:32 +00:00
Родитель d64d40903d
Коммит bbb28ca9ba
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -325,6 +325,9 @@ DManipEventHandler::OnContentUpdated(IDirectManipulationViewport* viewport,
} else if (mState == State::ePinching) {
if (mShouldSendPinchStart) {
updateLastScale = SendPinch(Phase::eStart, scale);
// If we get here our current scale is not fuzzy equal to the previous
// scale, so SendPinch should return true.
MOZ_ASSERT(updateLastScale);
mShouldSendPinchStart = false;
} else {
updateLastScale = SendPinch(Phase::eMiddle, scale);