| 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);
|
| }
|
| }
|
|
|
|
|