Chromium Code Reviews| Index: Source/core/dom/KeyboardEvent.h |
| diff --git a/Source/core/dom/KeyboardEvent.h b/Source/core/dom/KeyboardEvent.h |
| index 1900174aa7f5dcc608cbb6eb08311275bb10ee7a..29d18b08bda3117e525682eae908a60e44c66488 100644 |
| --- a/Source/core/dom/KeyboardEvent.h |
| +++ b/Source/core/dom/KeyboardEvent.h |
| @@ -123,6 +123,12 @@ private: |
| virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
| }; |
| +inline KeyboardEvent* toKeyboardEvent(Event* event) |
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(event && event->isKeyboardEvent()); |
|
tkent
2013/06/16 22:50:24
We usually allow NULL argument for toFoo functions
|
| + return static_cast<KeyboardEvent*>(event); |
| +} |
| + |
| } // namespace WebCore |
| #endif // KeyboardEvent_h |