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

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

Issue 2845973002: Merge two IsInDocument implementations. (Closed)
Patch Set: Created 3 years, 8 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/EventHandlingUtil.cpp ('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 b4bf7541f4b9c6c8c3f1a60af86f90840e96f2cf..f38fd0794bf1acf1585413e56a6a7e51b9261d13 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -29,10 +29,6 @@ size_t ToPointerTypeIndex(WebPointerProperties::PointerType t) {
return static_cast<size_t>(t);
}
-bool IsInDocument(EventTarget* n) {
- return n && n->ToNode() && n->ToNode()->isConnected();
-}
-
Vector<std::pair<WebTouchPoint, TimeTicks>> GetCoalescedPoints(
const Vector<WebTouchEvent>& coalesced_events,
int id) {
@@ -496,10 +492,11 @@ WebInputEventResult PointerEventManager::SendMousePointerEvent(
EventTarget* mouse_target = effective_target;
// Event path could be null if pointer event is not dispatched and
// that happens for example when pointer event feature is not enabled.
- if (!IsInDocument(mouse_target) && pointer_event->HasEventPath()) {
+ if (!EventHandlingUtil::IsInDocument(mouse_target) &&
+ pointer_event->HasEventPath()) {
for (const auto& context :
pointer_event->GetEventPath().NodeEventContexts()) {
- if (IsInDocument(context.GetNode())) {
+ if (EventHandlingUtil::IsInDocument(context.GetNode())) {
mouse_target = context.GetNode();
break;
}
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlingUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698