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

Unified Diff: third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp

Issue 2916893003: Bookkeep the pointer event listeners added to page (Closed)
Patch Set: Created 3 years, 7 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/frame/EventHandlerRegistry.cpp
diff --git a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
index 9ce3ff4a3014ddfd571e050a48cc40423b4ff516..0d9695e5ce299505448d84f7ac2493c7e1160c0b 100644
--- a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
+++ b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
@@ -56,10 +56,9 @@ bool EventHandlerRegistry::EventTypeToClass(
*result = options.passive() ? kTouchStartOrMoveEventPassive
: kTouchStartOrMoveEventBlocking;
} else if (EventUtil::IsPointerEventType(event_type)) {
- // The EventHandlerClass is TouchStartOrMoveEventPassive since
- // the pointer events never block scrolling and the compositor
+ // The pointer events never block scrolling and the compositor
// only needs to know about the touch listeners.
- *result = kTouchStartOrMoveEventPassive;
+ *result = kPointerEvent;
#if DCHECK_IS_ON()
} else if (event_type == EventTypeNames::load ||
event_type == EventTypeNames::mousemove ||
@@ -224,11 +223,13 @@ void EventHandlerRegistry::NotifyHasHandlersChanged(
break;
case kTouchStartOrMoveEventBlocking:
case kTouchStartOrMoveEventPassive:
+ case kPointerEvent:
page_->GetChromeClient().SetEventListenerProperties(
frame, WebEventListenerClass::kTouchStartOrMove,
GetWebEventListenerProperties(
HasEventHandlers(kTouchStartOrMoveEventBlocking),
- HasEventHandlers(kTouchStartOrMoveEventPassive)));
+ HasEventHandlers(kTouchStartOrMoveEventPassive) ||
+ HasEventHandlers(kPointerEvent)));
break;
case kTouchEndOrCancelEventBlocking:
case kTouchEndOrCancelEventPassive:

Powered by Google App Engine
This is Rietveld 408576698