Bug 1507615 - part1 : don't activate document if the 'pointdown' is originated from touch event r=smaug

For touch events, we use 'touchend' to activate document, because 'touchstart' can be the start of either draging
or touch. As 'pointdown' is a precedent event of the 'touchstart', we should not activate document if the source of
event is from touch event.

Differential Revision: https://phabricator.services.mozilla.com/D12333

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2018-11-20 01:20:09 +00:00
parent d3667cf5f0
commit 8c0164ff2e

View File

@ -661,13 +661,9 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
case ePointerDown:
if (aEvent->mMessage == ePointerDown) {
PointerEventHandler::ImplicitlyCapturePointer(aTargetFrame, aEvent);
#ifndef MOZ_WIDGET_ANDROID
// Pointer events aren't enabled on Android yet, but when they
// are enabled, we should not activate on pointerdown, as that
// fires for touches that turn into moves on Android, and we don't
// want to gesture activate for scroll actions.
NotifyTargetUserActivation(aEvent, aTargetContent);
#endif
if (mouseEvent->inputSource != MouseEvent_Binding::MOZ_SOURCE_TOUCH) {
NotifyTargetUserActivation(aEvent, aTargetContent);
}
}
MOZ_FALLTHROUGH;
case ePointerMove: {