Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 94ab8cc45b04f89c0276867bc1c142168416aa00..863497953f48aa45fcaa90a1072b9d54cf2c4fc1 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -39,13 +39,13 @@ |
#include "core/dom/Document.h" |
#include "core/dom/DocumentMarkerController.h" |
#include "core/dom/Text.h" |
-#include "core/dom/WheelController.h" |
#include "core/editing/Editor.h" |
#include "core/editing/FrameSelection.h" |
#include "core/editing/InputMethodController.h" |
#include "core/editing/TextIterator.h" |
#include "core/events/KeyboardEvent.h" |
#include "core/events/WheelEvent.h" |
+#include "core/frame/EventHandlerRegistry.h" |
#include "core/frame/FrameHost.h" |
#include "core/frame/FrameView.h" |
#include "core/frame/LocalFrame.h" |
@@ -1482,7 +1482,7 @@ void WebViewImpl::popupOpened(PopupContainer* popupContainer) |
m_selectPopup = popupContainer; |
ASSERT(mainFrameImpl()->frame()->document()); |
Document& document = *mainFrameImpl()->frame()->document(); |
- WheelController::from(document)->didAddWheelEventHandler(document); |
+ page()->frameHost().eventHandlerRegistry().didAddEventHandler(document, EventHandlerRegistry::WheelEvent); |
} |
void WebViewImpl::popupClosed(PopupContainer* popupContainer) |
@@ -1491,7 +1491,9 @@ void WebViewImpl::popupClosed(PopupContainer* popupContainer) |
m_selectPopup = nullptr; |
ASSERT(mainFrameImpl()->frame()->document()); |
Document& document = *mainFrameImpl()->frame()->document(); |
- WheelController::from(document)->didRemoveWheelEventHandler(document); |
+ EventHandlerRegistry* registry = &document.frameHost()->eventHandlerRegistry(); |
+ if (registry->eventHandlerTargets(EventHandlerRegistry::WheelEvent)->contains(&document)) |
Rick Byers
2014/06/03 21:32:33
nit: add a comment saying why the 'if' is necessar
|
+ registry->didRemoveEventHandler(document, EventHandlerRegistry::WheelEvent); |
} |
PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& originBoundsInRootView) |