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

Unified Diff: Source/core/dom/Node.cpp

Issue 26434002: Cleanup: Add more conversion helpers for usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | « no previous file | Source/core/events/GestureEvent.h » ('j') | Source/core/events/GestureEvent.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 6bea5c1e67110e84b44eef0523eb5b53e3fed655..fd8b48b59ebf2ac71df8c9202ceca3351fa3ff6d 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -2386,9 +2386,10 @@ void Node::defaultEventHandler(Event* event)
if (Page* page = document().page())
page->contextMenuController().handleContextMenuEvent(event);
} else if (eventType == eventNames().textInputEvent) {
- if (event->hasInterface(eventNames().interfaceForTextEvent))
+ if (event->hasInterface(eventNames().interfaceForTextEvent)) {
if (Frame* frame = document().frame())
- frame->eventHandler()->defaultTextInputEventHandler(static_cast<TextEvent*>(event));
+ frame->eventHandler()->defaultTextInputEventHandler(toTextEvent(event));
+ }
#if OS(WIN)
} else if (eventType == eventNames().mousedownEvent && event->isMouseEvent()) {
MouseEvent* mouseEvent = toMouseEvent(event);
@@ -2407,7 +2408,7 @@ void Node::defaultEventHandler(Event* event)
}
#endif
} else if ((eventType == eventNames().wheelEvent || eventType == eventNames().mousewheelEvent) && event->hasInterface(eventNames().interfaceForWheelEvent)) {
- WheelEvent* wheelEvent = static_cast<WheelEvent*>(event);
+ WheelEvent* wheelEvent = toWheelEvent(event);
// If we don't have a renderer, send the wheel event to the first node we find with a renderer.
// This is needed for <option> and <optgroup> elements so that <select>s get a wheel scroll.
« no previous file with comments | « no previous file | Source/core/events/GestureEvent.h » ('j') | Source/core/events/GestureEvent.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698