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

Unified Diff: sky/engine/core/events/EventDispatcher.cpp

Issue 772743004: Remove more Node API. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/events/EventDispatcher.h ('k') | sky/engine/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/events/EventDispatcher.cpp
diff --git a/sky/engine/core/events/EventDispatcher.cpp b/sky/engine/core/events/EventDispatcher.cpp
index f2eb0893a30fba335678745e548b1a66915d71a2..b7c51d9e36c4d1cb653e3d8e132d6596546f59ab 100644
--- a/sky/engine/core/events/EventDispatcher.cpp
+++ b/sky/engine/core/events/EventDispatcher.cpp
@@ -117,12 +117,11 @@ bool EventDispatcher::dispatch()
WindowEventContext windowEventContext(m_event.get(), m_node.get(), topNodeEventContext());
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EventDispatch", "data", InspectorEventDispatchEvent::data(*m_event));
- void* preDispatchEventHandlerResult;
- if (dispatchEventPreProcess(preDispatchEventHandlerResult) == ContinueDispatching)
+ if (dispatchEventPreProcess() == ContinueDispatching)
if (dispatchEventAtCapturing(windowEventContext) == ContinueDispatching)
if (dispatchEventAtTarget() == ContinueDispatching)
dispatchEventAtBubbling(windowEventContext);
- dispatchEventPostProcess(preDispatchEventHandlerResult);
+ dispatchEventPostProcess();
// Ensure that after event dispatch, the event's target object is the
// outermost shadow DOM boundary.
@@ -133,10 +132,8 @@ bool EventDispatcher::dispatch()
return !m_event->defaultPrevented();
}
-inline EventDispatchContinuation EventDispatcher::dispatchEventPreProcess(void*& preDispatchEventHandlerResult)
+inline EventDispatchContinuation EventDispatcher::dispatchEventPreProcess()
{
- // Give the target node a chance to do some work before DOM event handlers get a crack.
- preDispatchEventHandlerResult = m_node->preDispatchEventHandler(m_event.get());
return (m_event->eventPath().isEmpty() || m_event->propagationStopped()) ? DoneDispatching : ContinueDispatching;
}
@@ -189,15 +186,12 @@ inline void EventDispatcher::dispatchEventAtBubbling(WindowEventContext& windowC
}
}
-inline void EventDispatcher::dispatchEventPostProcess(void* preDispatchEventHandlerResult)
+inline void EventDispatcher::dispatchEventPostProcess()
{
m_event->setTarget(EventPath::eventTargetRespectingTargetRules(m_node.get()));
m_event->setCurrentTarget(0);
m_event->setEventPhase(0);
- // Pass the data from the preDispatchEventHandler to the postDispatchEventHandler.
- m_node->postDispatchEventHandler(m_event.get(), preDispatchEventHandlerResult);
-
// Call default event handlers. While the DOM does have a concept of preventing
// default handling, the detail of which handlers are called is an internal
// implementation detail and not part of the DOM.
« no previous file with comments | « sky/engine/core/events/EventDispatcher.h ('k') | sky/engine/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698