Index: Source/core/dom/TextEvent.h |
diff --git a/Source/core/dom/TextEvent.h b/Source/core/dom/TextEvent.h |
index c0dcb692645dbb3b8cc4ea49a29eb9734e4b91c4..a9bb41548f601e26d761888a2859d174b1c44752 100644 |
--- a/Source/core/dom/TextEvent.h |
+++ b/Source/core/dom/TextEvent.h |
@@ -27,6 +27,7 @@ |
#ifndef TextEvent_h |
#define TextEvent_h |
+#include "core/dom/EventNames.h" |
#include "core/dom/TextEventInputType.h" |
#include "core/dom/UIEvent.h" |
@@ -76,6 +77,12 @@ namespace WebCore { |
bool m_shouldMatchStyle; |
}; |
+inline TextEvent* toTextEvent(Event* event) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!event || (event->type() == eventNames().textInputEvent && event->hasInterface(eventNames().interfaceForTextEvent))); |
+ return static_cast<TextEvent*>(event); |
+} |
+ |
} // namespace WebCore |
#endif // TextEvent_h |