• akling@apple.com's avatar
    Move keyboard event dispatch from Node to Element. · 26d79700
    akling@apple.com authored
    <https://webkit.org/b/121873>
    
    Reviewed by Antti Koivisto.
    
    We only dispatch keyboard events on Elements so that logic shouldn't be in Node.
    
    * dom/Document.cpp:
    (WebCore::eventTargetElementForDocument):
    
        Reworked to return Element instead of Node.
    
    * dom/Document.h:
    * dom/Element.h:
    * dom/Element.cpp:
    (WebCore::Element::dispatchKeyEvent):
    
        Moved from Node to Element.
    
    * editing/AlternativeTextController.cpp:
    (WebCore::AlternativeTextController::insertDictatedText):
    * page/EventHandler.cpp:
    (WebCore::EventHandler::keyEvent):
    (WebCore::EventHandler::handleTextInputEvent):
    
        Adjusted for above changes.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    26d79700
EventHandler.cpp 156 KB