2011-03-28 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Eric Seidel.
Remove specialization of EventDispatcher with inversion of control.
https://bugs.webkit.org/show_bug.cgi?id=57285
Since some events have extra logic around their dispatch, allow them
to dispatch themselves and specialize the logic. This change only
converts KeyboardEvent to this model.
No functional change, covered by existing tests.
* dom/Event.cpp:
(WebCore::Event::dispatch): Added.
* dom/Event.h: Updated decls.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent): Changed to ask event to dispatch
itself.
* dom/EventDispatcher.h: Updated decls.
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::dispatch): Added, moving code from EventDispatcher.
* dom/KeyboardEvent.h: Updated decls.
* dom/Node.cpp:
(WebCore::Node::dispatchKeyEvent): Changed to use the new ways.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82264
268f45cc-cd09-0410-ab3c-
d52691b4dbfc