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

Unified Diff: trunk/Source/web/WebPluginContainerImpl.cpp

Issue 391483002: Revert 177812 "Migrate touch events to EventHandlerRegistry" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 5 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 | « trunk/Source/core/testing/Internals.cpp ('k') | trunk/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/web/WebPluginContainerImpl.cpp
===================================================================
--- trunk/Source/web/WebPluginContainerImpl.cpp (revision 177995)
+++ trunk/Source/web/WebPluginContainerImpl.cpp (working copy)
@@ -40,7 +40,6 @@
#include "core/events/MouseEvent.h"
#include "core/events/TouchEvent.h"
#include "core/events/WheelEvent.h"
-#include "core/frame/EventHandlerRegistry.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLFormElement.h"
@@ -515,13 +514,10 @@
if (m_touchEventRequestType == requestType)
return;
- if (m_element->document().frameHost()) {
- EventHandlerRegistry& registry = m_element->document().frameHost()->eventHandlerRegistry();
- if (requestType != TouchEventRequestTypeNone && m_touchEventRequestType == TouchEventRequestTypeNone)
- registry.didAddEventHandler(*m_element, EventHandlerRegistry::TouchEvent);
- else if (requestType == TouchEventRequestTypeNone && m_touchEventRequestType != TouchEventRequestTypeNone)
- registry.didRemoveEventHandler(*m_element, EventHandlerRegistry::TouchEvent);
- }
+ if (requestType != TouchEventRequestTypeNone && m_touchEventRequestType == TouchEventRequestTypeNone)
+ m_element->document().didAddTouchEventHandler(m_element);
+ else if (requestType == TouchEventRequestTypeNone && m_touchEventRequestType != TouchEventRequestTypeNone)
+ m_element->document().didRemoveTouchEventHandler(m_element);
m_touchEventRequestType = requestType;
}
@@ -684,8 +680,8 @@
//
m_element = 0;
#else
- if (m_touchEventRequestType != TouchEventRequestTypeNone && m_element->document().frameHost())
- m_element->document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*m_element, EventHandlerRegistry::TouchEvent);
+ if (m_touchEventRequestType != TouchEventRequestTypeNone)
+ m_element->document().didRemoveTouchEventHandler(m_element);
#endif
for (size_t i = 0; i < m_pluginLoadObservers.size(); ++i)
@@ -698,8 +694,8 @@
#if ENABLE(OILPAN)
void WebPluginContainerImpl::detach()
{
- if (m_touchEventRequestType != TouchEventRequestTypeNone && m_element->document().frameHost())
- m_element->document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*m_element, EventHandlerRegistry::TouchEvent);
+ if (m_touchEventRequestType != TouchEventRequestTypeNone)
+ m_element->document().didRemoveTouchEventHandler(m_element);
setWebLayer(0);
}
« no previous file with comments | « trunk/Source/core/testing/Internals.cpp ('k') | trunk/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698