Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: third_party/WebKit/Source/core/input/PointerEventManager.cpp

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: a Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/input/PointerEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
index 5dae54204c09d59fadb4dc303b6dfb2500124de1..d6c05afa253a4cbce310004aa02147c1d66bc075 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -4,6 +4,7 @@
#include "core/input/PointerEventManager.h"
+#include "core/dom/DocumentUserGestureToken.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/shadow/FlatTreeTraversal.h"
#include "core/events/MouseEvent.h"
@@ -171,8 +172,8 @@ WebInputEventResult PointerEventManager::dispatchPointerEvent(
std::unique_ptr<UserGestureIndicator> gestureIndicator;
if (eventType == EventTypeNames::pointerup &&
pointerEvent->pointerType() == "touch") {
- gestureIndicator =
- wrapUnique(new UserGestureIndicator(UserGestureToken::create()));
+ gestureIndicator = wrapUnique(new UserGestureIndicator(
+ DocumentUserGestureToken::create(m_frame->document())));
Rick Byers 2016/10/17 17:02:46 I'm not positive what m_frame refers to here in al
Navid Zolghadr 2016/10/17 17:18:05 Unfortunately that is the case for touch events. m
Nate Chapin 2016/10/18 23:26:33 Done. It's safe to assume that the EventTarget is
Rick Byers 2016/10/24 18:30:46 I don't think so - I believe there are rare scenar
Nate Chapin 2016/10/24 18:45:18 SG, added a null check.
}
DispatchEventResult dispatchResult = target->dispatchEvent(pointerEvent);

Powered by Google App Engine
This is Rietveld 408576698