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

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

Issue 225823007: Migrate wheel events to EventHandlerRegistry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 6 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 | « Source/core/frame/EventHandlerRegistry.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/core/frame/EventHandlerRegistry.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698