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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 225823007: Migrate wheel events to EventHandlerRegistry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove fake handler conditionally. 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
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698