2011-04-04 Dimitri Glazkov <dglazkov@chromium.org>
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Apr 2011 23:23:06 +0000 (23:23 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Apr 2011 23:23:06 +0000 (23:23 +0000)
commitb3bd295656d7e092adfd3e63222f82fe0b0d84f3
treea74bd744807a53d3e37f3c830c7258aedddc329b
parente1a86b0d179c84ceada933d011b310cf322ec1c4
2011-04-04  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Adam Barth.

        Introduce EventDispatchMediator abstraction, which encapsulate all
        non-trivial logic around firing a specific type of an event.
        https://bugs.webkit.org/show_bug.cgi?id=57562

        Refactoring, covered by existing tests.

        * dom/Event.cpp:
        (WebCore::EventDispatchMediator::EventDispatchMediator): Added.
        (WebCore::EventDispatchMediator::~EventDispatchMediator): Added.
        (WebCore::EventDispatchMediator::dispatchEvent): Added.
        (WebCore::EventDispatchMediator::event): Added.
        * dom/Event.h: Added decl.
        * dom/EventDispatcher.cpp:
        (WebCore::EventDispatcher::dispatchEvent): Changed to use EventDispatchMediator.
        * dom/EventDispatcher.h: Updated decls.
        * dom/KeyboardEvent.cpp:
        (WebCore::KeyboardEventDispatchMediator::KeyboardEventDispatchMediator): Added.
        (WebCore::KeyboardEventDispatchMediator::dispatchEvent): Added.
        * dom/KeyboardEvent.h: Updated decls
        * dom/Node.cpp:
        (WebCore::Node::dispatchEvent): Changed to use EventDispatchMediator.
        (WebCore::Node::dispatchKeyEvent): Changed to use KeyboardEventDispatchMediator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82891 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