2011-03-28 Dimitri Glazkov <dglazkov@chromium.org>
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 16:21:04 +0000 (16:21 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 16:21:04 +0000 (16:21 +0000)
commit3aaf5e64d08e929b90b6b4fabdae83c80e620a27
tree7158a7ed32e71a775bfa9d9444f91c7db8ae9e92
parentdcb0cfae97cce697bb1614a69e21a70767ecc59e
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
Source/WebCore/ChangeLog
Source/WebCore/dom/Event.cpp
Source/WebCore/dom/Event.h
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/EventDispatcher.h
Source/WebCore/dom/KeyboardEvent.cpp
Source/WebCore/dom/KeyboardEvent.h
Source/WebCore/dom/Node.cpp