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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 225823007: Migrate wheel events to EventHandlerRegistry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 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: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index dd5459233f8db3b8a74d7e3dcdf3b9fa64af4f44..a154c37571a7aa86d587b88fe2dff2f4ffa8d97d 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -31,7 +31,6 @@
#include "core/dom/Document.h"
#include "core/dom/FullscreenElementStack.h"
#include "core/dom/Node.h"
-#include "core/dom/WheelController.h"
#include "core/frame/EventHandlerRegistry.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
@@ -663,13 +662,8 @@ void ScrollingCoordinator::updateHaveWheelEventHandlers()
return;
if (WebLayer* scrollLayer = toWebLayer(m_page->mainFrame()->view()->layerForScrolling())) {
- unsigned wheelEventHandlerCount = 0;
-
- for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- wheelEventHandlerCount += WheelController::from(*frame->document())->wheelEventHandlerCount();
- }
-
- scrollLayer->setHaveWheelEventHandlers(wheelEventHandlerCount);
+ bool haveHandlers = m_page->frameHost().eventHandlerRegistry().hasEventHandlers(EventHandlerRegistry::WheelEvent);
+ scrollLayer->setHaveWheelEventHandlers(haveHandlers);
}
}

Powered by Google App Engine
This is Rietveld 408576698