FocusController::setFocusedNode() should be setFocusedElement().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 May 2013 11:39:01 +0000 (11:39 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 May 2013 11:39:01 +0000 (11:39 +0000)
commitb59bf9d75075b0a157e5e6722739a0f6d52da12f
tree8ebfddb2c2a23154a4ec4126190d494c0112f7d9
parent6db2646870577f3c8f1a6ebe1a19b93d87196089
FocusController::setFocusedNode() should be setFocusedElement().
<http://webkit.org/b/116780>

Reviewed by Antti Koivisto.

Source/WebCore:

Only Elements can have focus, so make the public API of FocusController take Element*.

* WebCore.exp.in:
* page/FocusController.h:
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):

    Out with the setFocusedNode(), in with the setFocusedElement().

* dom/Element.cpp:
(WebCore::Element::focus):
(WebCore::Element::blur):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):
* plugins/PluginView.cpp:
(WebCore::PluginView::focusPluginElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedNodeIfNeeded):

    Tweak for FocusController taking Element* instead of Node*.

(WebCore::FrameSelection::setFocusedElementIfNeeded):

    Renamed from setFocusedNodeIfNeeded().

* editing/htmlediting.h:
* editing/htmlediting.cpp:
(WebCore::enclosingAnchorElement):

    Cleaned up the loop for readability and made it return an Element.

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::clearFocusNode):
(BlackBerry::WebKit::WebPage::setNodeFocus):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectObject):

Source/WebKit/win:

* WebView.cpp:
(WebView::clearFocusNode):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::focusPluginElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/dom/Element.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/htmlediting.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/FocusController.h
Source/WebCore/plugins/PluginView.cpp
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PluginView.cpp