Move keyboard event dispatch from Node to Element.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 23:39:51 +0000 (23:39 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 23:39:51 +0000 (23:39 +0000)
commit3690a988a545ba0f933188aaac23030d2b6e5083
tree2abb2d2b92cf068a5026695e55f77d61ee75ac81
parent4c0490413ba95afaa95a4b6ed59197a90b5ed9d8
Move keyboard event dispatch from Node to Element.
<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: https://svn.webkit.org/repository/webkit/trunk@156372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/editing/AlternativeTextController.cpp
Source/WebCore/page/EventHandler.cpp