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: http://svn.webkit.org/repository/webkit/trunk@150712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TreeScope::rootNode() should return a ContainerNode.
<http://webkit.org/b/116782>

Reviewed by Antti Koivisto.

The rootNode() of a TreeScope is always a ContainerNode, so update pointer types to reflect that.
This lets us take advantage of Antti's optimized traversal functions.

* dom/ContainerNode.h:
(WebCore::Node::isTreeScope):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
* dom/Node.cpp:
(WebCore::Node::containingShadowRoot):
* dom/Node.h:
* dom/TreeScope.h:
(WebCore::TreeScope::rootNode):
(TreeScope):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::rootNode):
(WebCore::FocusNavigationScope::owner):
* page/FocusController.h:
(FocusNavigationScope):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150713 268f45cc-cd09-0410-ab3c-d52691b4dbfc