Index: Source/core/frame/EventHandlerRegistry.cpp |
diff --git a/Source/core/frame/EventHandlerRegistry.cpp b/Source/core/frame/EventHandlerRegistry.cpp |
index 5161cf92e82630ebc6e88c224c7c0a09c99f858d..3e3d38b5ae39a6dda1ec9f5e59da3fb9f7bd11b5 100644 |
--- a/Source/core/frame/EventHandlerRegistry.cpp |
+++ b/Source/core/frame/EventHandlerRegistry.cpp |
@@ -28,6 +28,8 @@ bool EventHandlerRegistry::eventTypeToClass(const AtomicString& eventType, Event |
{ |
if (eventType == EventTypeNames::scroll) { |
*result = ScrollEvent; |
+ } else if (eventType == EventTypeNames::wheel || eventType == EventTypeNames::mousewheel) { |
+ *result = WheelEvent; |
#if ASSERT_ENABLED |
} else if (eventType == EventTypeNames::load || eventType == EventTypeNames::mousemove || eventType == EventTypeNames::touchstart) { |
*result = EventsForTesting; |
@@ -155,12 +157,21 @@ void EventHandlerRegistry::updateAllEventHandlers(ChangeOperation op, EventTarge |
void EventHandlerRegistry::notifyHasHandlersChanged(EventHandlerClass handlerClass, bool hasActiveHandlers) |
{ |
ScrollingCoordinator* scrollingCoordinator = m_frameHost.page().scrollingCoordinator(); |
+ LocalFrame* mainFrame = m_frameHost.page().mainFrame(); |
switch (handlerClass) { |
case ScrollEvent: |
if (scrollingCoordinator) |
scrollingCoordinator->updateHaveScrollEventHandlers(); |
break; |
+ case WheelEvent: |
+ if (mainFrame) { |
+ // FIXME: This notification is wired up to a black hole, so remove it. |
+ mainFrame->notifyChromeClientWheelEventHandlerCountChanged(); |
+ } |
+ if (scrollingCoordinator) |
+ scrollingCoordinator->updateHaveWheelEventHandlers(); |
+ break; |
#if ASSERT_ENABLED |
case EventsForTesting: |
break; |