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

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

Issue 2447773004: Check the root pointer events as well for capture (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/input/PointerEventManager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4ea4323eb94b90958605dd06b19ef04a2743f0d4..ba801441ca9672740cf825d2e2cea0327c56619a 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -663,6 +663,24 @@ bool PointerEventManager::isActive(const int pointerId) const {
return m_pointerEventFactory.isActive(pointerId);
}
+// This function checks the type of the pointer event to be touch as touch
+// pointer events are the only ones that are directly dispatched from the main
+// page managers to their target (event if target is in an iframe) and only
+// those managers will keep track of these pointer events.
+bool PointerEventManager::isTouchPointerIdActiveOnFrame(
+ int pointerId,
+ LocalFrame* frame) const {
+ if (m_pointerEventFactory.getPointerType(pointerId) !=
+ WebPointerProperties::PointerType::Touch)
+ return false;
+ Node* lastNodeReceivingEvent =
+ m_nodeUnderPointer.contains(pointerId)
+ ? m_nodeUnderPointer.get(pointerId).target->toNode()
+ : nullptr;
+ return lastNodeReceivingEvent &&
+ lastNodeReceivingEvent->document().frame() == frame;
+}
+
bool PointerEventManager::isAnyTouchActive() const {
return m_touchEventManager->isAnyTouchActive();
}
« no previous file with comments | « third_party/WebKit/Source/core/input/PointerEventManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698