• dglazkov@chromium.org's avatar
    2011-04-05 Dimitri Glazkov <dglazkov@chromium.org> · 72e43ec9
    dglazkov@chromium.org authored
            Reviewed by Darin Adler.
    
            Move WheelEvent-dispatching logic into WheelEventDispatchMediator.
            https://bugs.webkit.org/show_bug.cgi?id=57642
    
            Covered by existing tests, no functional change.
    
            * dom/Event.cpp:
            * dom/Event.h:
            (WebCore::EventDispatchMediator::EventDispatchMediator): Added default
                constructor.
            (WebCore::EventDispatchMediator::event): Inlined.
            (WebCore::EventDispatchMediator::setEvent): Added.
            * dom/EventDispatcher.cpp: Removed dispatchWheelEvent.
            * dom/EventDispatcher.h: Updated decls.
            * dom/Node.cpp:
            (WebCore::Node::dispatchWheelEvent): Changed to use the mediator and
                return a bool, like other dispatch event functions.
            * dom/Node.h: Changed decl.
            * dom/WheelEvent.cpp:
            (WebCore::granularity): Moved from EventDispatcher.
            (WebCore::WheelEventDispatchMediator::WheelEventDisatchMediator): Added.
            (WebCore::WheelEventDispatchMediator::event): Added.
            (WebCore::WheelEventDispatchMediator::dispatchEvent): Added.
            * dom/WheelEvent.h: Updated decls.
            * page/EventHandler.cpp:
            (WebCore::EventHandler::handleWheelEvent): Changed to receive and react
                to the return value.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    72e43ec9
WheelEvent.h 3.72 KB