<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[150796] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/150796">150796</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2013-05-28 05:46:31 -0700 (Tue, 28 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Document::setFocusedNode() should be setFocusedElement().
&lt;http://webkit.org/b/116857&gt;

Reviewed by Antti Koivisto.

Source/WebCore:

Only Elements can be focused, so tighten Document's idea of what's focused.

Most of this patch is just updating call sites for the new names and removing
now-unnecessary isElementNode() checks and casts.

* WebCore.exp.in:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetFocusAttribute):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFocused):
(WebCore::AccessibilityRenderObject::setFocused):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
* bindings/objc/DOM.mm:
(-[DOMElement isFocused]):
* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::detach):
(WebCore::Document::focusedNodeRemoved):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::eventTargetNodeForDocument):
* dom/Document.h:
(Document):
(WebCore::Document::focusedElement):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::focus):
(WebCore::Element::blur):
(WebCore::Element::cancelFocusAppearanceUpdate):
* dom/Node.cpp:
(WebCore::Node::rendererIsEditable):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedElement):
* dom/UserTypingGestureIndicator.cpp:
(WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::setComposition):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
(WebCore::FrameSelection::focusedOrActiveStateChanged):
(WebCore::FrameSelection::setFocusedElementIfNeeded):
(WebCore::FrameSelection::currentForm):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::attach):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setValueCommon):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
(WebCore::HTMLTextFormControlElement::selectionStart):
(WebCore::HTMLTextFormControlElement::selectionEnd):
(WebCore::HTMLTextFormControlElement::selectionDirection):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::focusedFieldIndex):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollOverflow):
(WebCore::EventHandler::logicalScrollOverflow):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::capsLockStateMayHaveChanged):
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedNode):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::FocusController::setFocusedElement):
(WebCore::FocusController::findFocusCandidateInContainer):
(WebCore::FocusController::advanceFocusDirectionallyInContainer):
(WebCore::FocusController::advanceFocusDirectionally):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* plugins/PluginView.cpp:
(WebCore::PluginView::focusPluginElement):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::setFocus):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::platformStart):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::focusNodeRect):
(BlackBerry::WebKit::WebPagePrivate::contextNode):
(BlackBerry::WebKit::WebPagePrivate::clearFocusNode):
(BlackBerry::WebKit::WebPage::setNodeFocus):
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
(WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::focusedNodeChanged):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::setCaretPosition):
(BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
(BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
(BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
(BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):

Source/WebKit/efl:

* ewk/ewk_frame.cpp:
(ewk_frame_focused_element_geometry_get):
* ewk/ewk_view.cpp:
(ewk_view_input_method_state_set):

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(getFocusedNode):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView clearFocus]):
(-[WebHTMLView becomeFirstResponder]):

Source/WebKit/qt:

* Api/qwebelement.cpp:
(QWebElement::hasFocus):
(QWebElement::setFocus):
* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::setInputMethodState):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::mousePressEvent):
(QWebPageAdapter::handleSoftwareInputPanel):
(QWebPageAdapter::inputMethodQuery):
(QWebPageAdapter::hasFocusedNode):

Source/WebKit/win:

* DOMCoreClasses.cpp:
(DOMElement::isFocused):
* WebView.cpp:
(WebView::setInitialFocus):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::focusPluginElement):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::focusedPluginViewForFrame):
(WebKit::WebPage::setInitialFocus):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAXObjectCachecpp">trunk/Source/WebCore/accessibility/AXObjectCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsobjcDOMmm">trunk/Source/WebCore/bindings/objc/DOM.mm</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomTreeScopecpp">trunk/Source/WebCore/dom/TreeScope.cpp</a></li>
<li><a href="#trunkSourceWebCoredomUserTypingGestureIndicatorcpp">trunk/Source/WebCore/dom/UserTypingGestureIndicator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorCommandcpp">trunk/Source/WebCore/editing/EditorCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFrameSelectioncpp">trunk/Source/WebCore/editing/FrameSelection.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryCachedPagecpp">trunk/Source/WebCore/history/CachedPage.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextAreaElementcpp">trunk/Source/WebCore/html/HTMLTextAreaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextFormControlElementcpp">trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlRadioInputTypecpp">trunk/Source/WebCore/html/RadioInputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowDateTimeEditElementcpp">trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFocusControllercpp">trunk/Source/WebCore/page/FocusController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsPluginViewcpp">trunk/Source/WebCore/plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginseflPluginViewEflcpp">trunk/Source/WebCore/plugins/efl/PluginViewEfl.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsmacPluginViewMacmm">trunk/Source/WebCore/plugins/mac/PluginViewMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderImagecpp">trunk/Source/WebCore/rendering/RenderImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlSingleLinecpp">trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemecpp">trunk/Source/WebCore/rendering/RenderTheme.cpp</a></li>
<li><a href="#trunkSourceWebKitblackberryApiWebPagecpp">trunk/Source/WebKit/blackberry/Api/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKitblackberryChangeLog">trunk/Source/WebKit/blackberry/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitblackberryWebCoreSupportEditorClientBlackBerrycpp">trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp</a></li>
<li><a href="#trunkSourceWebKitblackberryWebKitSupportInputHandlercpp">trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp</a></li>
<li><a href="#trunkSourceWebKitblackberryWebKitSupportSelectionHandlercpp">trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp</a></li>
<li><a href="#trunkSourceWebKiteflChangeLog">trunk/Source/WebKit/efl/ChangeLog</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_framecpp">trunk/Source/WebKit/efl/ewk/ewk_frame.cpp</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_viewcpp">trunk/Source/WebKit/efl/ewk/ewk_view.cpp</a></li>
<li><a href="#trunkSourceWebKitgtkChangeLog">trunk/Source/WebKit/gtk/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitgtkwebkitwebkitwebviewcpp">trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
<li><a href="#trunkSourceWebKitqtApiqwebelementcpp">trunk/Source/WebKit/qt/Api/qwebelement.cpp</a></li>
<li><a href="#trunkSourceWebKitqtChangeLog">trunk/Source/WebKit/qt/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitqtWebCoreSupportEditorClientQtcpp">trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp</a></li>
<li><a href="#trunkSourceWebKitqtWebCoreSupportQWebPageAdaptercpp">trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinDOMCoreClassescpp">trunk/Source/WebKit/win/DOMCoreClasses.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,112 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        Only Elements can be focused, so tighten Document's idea of what's focused.
+
+        Most of this patch is just updating call sites for the new names and removing
+        now-unnecessary isElementNode() checks and casts.
+
+        * WebCore.exp.in:
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::focusedUIElementForPage):
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::isFocused):
+        (WebCore::AccessibilityRenderObject::setFocused):
+        (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
+        * bindings/objc/DOM.mm:
+        (-[DOMElement isFocused]):
+        * dom/Document.cpp:
+        (WebCore::Document::dispose):
+        (WebCore::Document::detach):
+        (WebCore::Document::focusedNodeRemoved):
+        (WebCore::Document::removeFocusedNodeOfSubtree):
+        (WebCore::Document::setFocusedElement):
+        (WebCore::Document::updateFocusAppearanceTimerFired):
+        (WebCore::eventTargetNodeForDocument):
+        * dom/Document.h:
+        (Document):
+        (WebCore::Document::focusedElement):
+        * dom/Element.cpp:
+        (WebCore::Element::attach):
+        (WebCore::Element::focus):
+        (WebCore::Element::blur):
+        (WebCore::Element::cancelFocusAppearanceUpdate):
+        * dom/Node.cpp:
+        (WebCore::Node::rendererIsEditable):
+        * dom/TreeScope.cpp:
+        (WebCore::TreeScope::focusedElement):
+        * dom/UserTypingGestureIndicator.cpp:
+        (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
+        * editing/Editor.cpp:
+        (WebCore::Editor::setBaseWritingDirection):
+        (WebCore::Editor::setComposition):
+        (WebCore::Editor::guessesForMisspelledOrUngrammatical):
+        * editing/EditorCommand.cpp:
+        (WebCore::verticalScrollDistance):
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::selectAll):
+        (WebCore::FrameSelection::focusedOrActiveStateChanged):
+        (WebCore::FrameSelection::setFocusedElementIfNeeded):
+        (WebCore::FrameSelection::currentForm):
+        * history/CachedPage.cpp:
+        (WebCore::CachedPage::restore):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::updateType):
+        (WebCore::HTMLInputElement::attach):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::setValueCommon):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
+        (WebCore::HTMLTextFormControlElement::selectionStart):
+        (WebCore::HTMLTextFormControlElement::selectionEnd):
+        (WebCore::HTMLTextFormControlElement::selectionDirection):
+        * html/RadioInputType.cpp:
+        (WebCore::RadioInputType::handleKeydownEvent):
+        (WebCore::RadioInputType::isKeyboardFocusable):
+        * html/shadow/DateTimeEditElement.cpp:
+        (WebCore::DateTimeEditElement::focusedFieldIndex):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::stopLoading):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::focus):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::scrollOverflow):
+        (WebCore::EventHandler::logicalScrollOverflow):
+        (WebCore::EventHandler::dispatchMouseEvent):
+        (WebCore::EventHandler::sendContextMenuEventForKey):
+        (WebCore::EventHandler::capsLockStateMayHaveChanged):
+        * page/FocusController.cpp:
+        (WebCore::dispatchEventsOnWindowAndFocusedNode):
+        (WebCore::FocusController::advanceFocusInDocumentOrder):
+        (WebCore::FocusController::setFocusedElement):
+        (WebCore::FocusController::findFocusCandidateInContainer):
+        (WebCore::FocusController::advanceFocusDirectionallyInContainer):
+        (WebCore::FocusController::advanceFocusDirectionally):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollToAnchor):
+        * plugins/PluginView.cpp:
+        (WebCore::PluginView::focusPluginElement):
+        * plugins/efl/PluginViewEfl.cpp:
+        (WebCore::PluginView::setFocus):
+        * plugins/mac/PluginViewMac.mm:
+        (WebCore::PluginView::platformStart):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::paintAreaElementFocusRing):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintItemForeground):
+        (WebCore::RenderListBox::paintItemBackground):
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
+        (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::isFocused):
+
</ins><span class="cx"> 2013-05-28  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Enable CSS logging
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/WebCore.exp.in        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1047,7 +1047,7 @@
</span><span class="cx"> __ZN7WebCore8Document12updateLayoutEv
</span><span class="cx"> __ZN7WebCore8Document13createElementERKNS_13QualifiedNameEb
</span><span class="cx"> __ZN7WebCore8Document14createTextNodeERKN3WTF6StringE
</span><del>-__ZN7WebCore8Document14setFocusedNodeEN3WTF10PassRefPtrINS_4NodeEEENS_14FocusDirectionE
</del><ins>+__ZN7WebCore8Document17setFocusedElementEN3WTF10PassRefPtrINS_7ElementEEENS_14FocusDirectionE
</ins><span class="cx"> __ZN7WebCore8Document16isPageBoxVisibleEi
</span><span class="cx"> __ZN7WebCore8Document16shortcutIconURLsEv
</span><span class="cx"> __ZN7WebCore8Document20styleResolverChangedENS_23StyleResolverUpdateFlagE
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -162,14 +162,11 @@
</span><span class="cx"> 
</span><span class="cx">     // get the focused node in the page
</span><span class="cx">     Document* focusedDocument = page-&gt;focusController()-&gt;focusedOrMainFrame()-&gt;document();
</span><del>-    Node* focusedNode = focusedDocument-&gt;focusedNode();
-    if (!focusedNode)
-        focusedNode = focusedDocument;
</del><ins>+    Element* focusedElement = focusedDocument-&gt;focusedElement();
+    if (focusedElement &amp;&amp; focusedElement-&gt;hasTagName(areaTag))
+        return focusedImageMapUIElement(static_cast&lt;HTMLAreaElement*&gt;(focusedElement));
</ins><span class="cx"> 
</span><del>-    if (focusedNode-&gt;hasTagName(areaTag))
-        return focusedImageMapUIElement(static_cast&lt;HTMLAreaElement*&gt;(focusedNode));
-    
-    AccessibilityObject* obj = focusedNode-&gt;document()-&gt;axObjectCache()-&gt;getOrCreate(focusedNode);
</del><ins>+    AccessibilityObject* obj = focusedDocument-&gt;axObjectCache()-&gt;getOrCreate(focusedElement ? static_cast&lt;Node*&gt;(focusedElement) : focusedDocument);
</ins><span class="cx">     if (!obj)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1781,8 +1781,8 @@
</span><span class="cx">     if (isWebArea())
</span><span class="cx">         return true;
</span><span class="cx">     
</span><del>-    // NOTE: It would be more accurate to ask the document whether setFocusedNode() would
-    // do anything. For example, setFocusedNode() will do nothing if the current focused
</del><ins>+    // NOTE: It would be more accurate to ask the document whether setFocusedElement() would
+    // do anything. For example, setFocusedElement() will do nothing if the current focused
</ins><span class="cx">     // node will not relinquish the focus.
</span><span class="cx">     if (!node)
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1576,13 +1576,13 @@
</span><span class="cx">     if (!document)
</span><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    Node* focusedNode = document-&gt;focusedNode();
-    if (!focusedNode)
</del><ins>+    Element* focusedElement = document-&gt;focusedElement();
+    if (!focusedElement)
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     // A web area is represented by the Document node in the DOM tree, which isn't focusable.
</span><span class="cx">     // Check instead if the frame's selection controller is focused
</span><del>-    if (focusedNode == m_renderer-&gt;node()
</del><ins>+    if (focusedElement == m_renderer-&gt;node()
</ins><span class="cx">         || (roleValue() == WebAreaRole &amp;&amp; document-&gt;frame()-&gt;selection()-&gt;isFocusedAndActive()))
</span><span class="cx">         return true;
</span><span class="cx">     
</span><span class="lines">@@ -1595,21 +1595,20 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     Document* document = this-&gt;document();
</span><del>-    if (!on)
-        document-&gt;setFocusedNode(0);
-    else {
-        Node* node = this-&gt;node();
-        if (node &amp;&amp; node-&gt;isElementNode()) {
-            // If this node is already the currently focused node, then calling focus() won't do anything.
-            // That is a problem when focus is removed from the webpage to chrome, and then returns.
-            // In these cases, we need to do what keyboard and mouse focus do, which is reset focus first.
-            if (document-&gt;focusedNode() == node)
-                document-&gt;setFocusedNode(0);
-            
-            toElement(node)-&gt;focus();
-        } else
-            document-&gt;setFocusedNode(node);
</del><ins>+    Node* node = this-&gt;node();
+
+    if (!on || !node || !node-&gt;isElementNode()) {
+        document-&gt;setFocusedElement(0);
+        return;
</ins><span class="cx">     }
</span><ins>+
+    // If this node is already the currently focused node, then calling focus() won't do anything.
+    // That is a problem when focus is removed from the webpage to chrome, and then returns.
+    // In these cases, we need to do what keyboard and mouse focus do, which is reset focus first.
+    if (document-&gt;focusedElement() == node)
+        document-&gt;setFocusedElement(0);
+
+    toElement(node)-&gt;focus();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityRenderObject::setSelectedRows(AccessibilityChildrenVector&amp; selectedRows)
</span><span class="lines">@@ -2330,7 +2329,7 @@
</span><span class="cx">     if (!element)
</span><span class="cx">         return;
</span><span class="cx">     Document* doc = renderer()-&gt;document();
</span><del>-    if (!doc-&gt;frame()-&gt;selection()-&gt;isFocusedAndActive() || doc-&gt;focusedNode() != element)
</del><ins>+    if (!doc-&gt;frame()-&gt;selection()-&gt;isFocusedAndActive() || doc-&gt;focusedElement() != element)
</ins><span class="cx">         return; 
</span><span class="cx">     AccessibilityRenderObject* activedescendant = static_cast&lt;AccessibilityRenderObject*&gt;(activeDescendant());
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsobjcDOMmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/objc/DOM.mm (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/objc/DOM.mm        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/bindings/objc/DOM.mm        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -405,7 +405,7 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Could we move this function to WebCore::Element and autogenerate?
</span><span class="cx">     WebCore::Element* element = core(self);
</span><del>-    return element-&gt;document()-&gt;focusedNode() == element;
</del><ins>+    return element-&gt;document()-&gt;focusedElement() == element;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/dom/Document.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -660,7 +660,7 @@
</span><span class="cx">     // We must make sure not to be retaining any of our children through
</span><span class="cx">     // these extra pointers or we will create a reference cycle.
</span><span class="cx">     m_docType = 0;
</span><del>-    m_focusedNode = 0;
</del><ins>+    m_focusedElement = 0;
</ins><span class="cx">     m_hoveredElement = 0;
</span><span class="cx">     m_activeElement = 0;
</span><span class="cx">     m_titleElement = 0;
</span><span class="lines">@@ -2104,7 +2104,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     m_hoveredElement = 0;
</span><del>-    m_focusedNode = 0;
</del><ins>+    m_focusedElement = 0;
</ins><span class="cx">     m_activeElement = 0;
</span><span class="cx"> 
</span><span class="cx">     ContainerNode::detach();
</span><span class="lines">@@ -3256,12 +3256,12 @@
</span><span class="cx"> 
</span><span class="cx"> void Document::focusedNodeRemoved()
</span><span class="cx"> {
</span><del>-    setFocusedNode(0);
</del><ins>+    setFocusedElement(0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::removeFocusedNodeOfSubtree(Node* node, bool amongChildrenOnly)
</span><span class="cx"> {
</span><del>-    if (!m_focusedNode || this-&gt;inPageCache()) // If the document is in the page cache, then we don't need to clear out the focused node.
</del><ins>+    if (!m_focusedElement || this-&gt;inPageCache()) // If the document is in the page cache, then we don't need to clear out the focused node.
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Element* focusedElement = node-&gt;treeScope()-&gt;focusedElement();
</span><span class="lines">@@ -3313,70 +3313,64 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool Document::setFocusedNode(PassRefPtr&lt;Node&gt; prpNewFocusedNode, FocusDirection direction)
</del><ins>+bool Document::setFocusedElement(PassRefPtr&lt;Element&gt; prpNewFocusedElement, FocusDirection direction)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;Node&gt; newFocusedNode = prpNewFocusedNode;
</del><ins>+    RefPtr&lt;Element&gt; newFocusedElement = prpNewFocusedElement;
</ins><span class="cx"> 
</span><del>-    // Make sure newFocusedNode is actually in this document
-    if (newFocusedNode &amp;&amp; (newFocusedNode-&gt;document() != this))
</del><ins>+    // Make sure newFocusedElement is actually in this document
+    if (newFocusedElement &amp;&amp; (newFocusedElement-&gt;document() != this))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    if (m_focusedNode == newFocusedNode)
</del><ins>+    if (m_focusedElement == newFocusedElement)
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     if (m_inPageCache)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     bool focusChangeBlocked = false;
</span><del>-    RefPtr&lt;Node&gt; oldFocusedNode = m_focusedNode;
-    m_focusedNode = 0;
</del><ins>+    RefPtr&lt;Element&gt; oldFocusedElement = m_focusedElement.release();
</ins><span class="cx"> 
</span><span class="cx">     // Remove focus from the existing focus node (if any)
</span><del>-    if (oldFocusedNode) {
-        ASSERT(!oldFocusedNode-&gt;inDetach());
</del><ins>+    if (oldFocusedElement) {
+        ASSERT(!oldFocusedElement-&gt;inDetach());
</ins><span class="cx"> 
</span><del>-        if (oldFocusedNode-&gt;isElementNode()) {
-            Element* oldFocusedElement = toElement(oldFocusedNode.get());
-            if (oldFocusedElement-&gt;active())
-                oldFocusedElement-&gt;setActive(false);
</del><ins>+        if (oldFocusedElement-&gt;active())
+            oldFocusedElement-&gt;setActive(false);
</ins><span class="cx"> 
</span><del>-            toElement(oldFocusedNode.get())-&gt;setFocus(false);
-        }
</del><ins>+        oldFocusedElement-&gt;setFocus(false);
</ins><span class="cx"> 
</span><span class="cx">         // Dispatch a change event for form control elements that have been edited.
</span><del>-        if (oldFocusedNode-&gt;isElementNode() &amp;&amp; toElement(oldFocusedNode.get())-&gt;isFormControlElement()) {
-            HTMLFormControlElement* formControlElement = toHTMLFormControlElement(oldFocusedNode.get());
</del><ins>+        if (oldFocusedElement-&gt;isFormControlElement()) {
+            HTMLFormControlElement* formControlElement = toHTMLFormControlElement(oldFocusedElement.get());
</ins><span class="cx">             if (formControlElement-&gt;wasChangedSinceLastFormControlChangeEvent())
</span><span class="cx">                 formControlElement-&gt;dispatchFormControlChangeEvent();
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Dispatch the blur event and let the node do any other blur related activities (important for text fields)
</span><del>-        oldFocusedNode-&gt;dispatchBlurEvent(newFocusedNode);
</del><ins>+        oldFocusedElement-&gt;dispatchBlurEvent(newFocusedElement);
</ins><span class="cx"> 
</span><del>-        if (m_focusedNode) {
</del><ins>+        if (m_focusedElement) {
</ins><span class="cx">             // handler shifted focus
</span><span class="cx">             focusChangeBlocked = true;
</span><del>-            newFocusedNode = 0;
</del><ins>+            newFocusedElement = 0;
</ins><span class="cx">         }
</span><span class="cx">         
</span><del>-        oldFocusedNode-&gt;dispatchFocusOutEvent(eventNames().focusoutEvent, newFocusedNode); // DOM level 3 name for the bubbling blur event.
</del><ins>+        oldFocusedElement-&gt;dispatchFocusOutEvent(eventNames().focusoutEvent, newFocusedElement); // DOM level 3 name for the bubbling blur event.
</ins><span class="cx">         // FIXME: We should remove firing DOMFocusOutEvent event when we are sure no content depends
</span><span class="cx">         // on it, probably when &lt;rdar://problem/8503958&gt; is resolved.
</span><del>-        oldFocusedNode-&gt;dispatchFocusOutEvent(eventNames().DOMFocusOutEvent, newFocusedNode); // DOM level 2 name for compatibility.
</del><ins>+        oldFocusedElement-&gt;dispatchFocusOutEvent(eventNames().DOMFocusOutEvent, newFocusedElement); // DOM level 2 name for compatibility.
</ins><span class="cx"> 
</span><del>-        if (m_focusedNode) {
</del><ins>+        if (m_focusedElement) {
</ins><span class="cx">             // handler shifted focus
</span><span class="cx">             focusChangeBlocked = true;
</span><del>-            newFocusedNode = 0;
</del><ins>+            newFocusedElement = 0;
</ins><span class="cx">         }
</span><del>-        if (oldFocusedNode == this &amp;&amp; oldFocusedNode-&gt;hasOneRef())
-            return true;
</del><span class="cx">             
</span><del>-        if (oldFocusedNode-&gt;isRootEditableElement())
</del><ins>+        if (oldFocusedElement-&gt;isRootEditableElement())
</ins><span class="cx">             frame()-&gt;editor().didEndEditing();
</span><span class="cx"> 
</span><span class="cx">         if (view()) {
</span><del>-            Widget* oldWidget = widgetForNode(oldFocusedNode.get());
</del><ins>+            Widget* oldWidget = widgetForNode(oldFocusedElement.get());
</ins><span class="cx">             if (oldWidget)
</span><span class="cx">                 oldWidget-&gt;setFocus(false);
</span><span class="cx">             else
</span><span class="lines">@@ -3384,27 +3378,27 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (newFocusedNode &amp;&amp; newFocusedNode-&gt;isElementNode() &amp;&amp; toElement(newFocusedNode.get())-&gt;isFocusable()) {
-        if (newFocusedNode-&gt;isRootEditableElement() &amp;&amp; !acceptsEditingFocus(newFocusedNode.get())) {
</del><ins>+    if (newFocusedElement &amp;&amp; newFocusedElement-&gt;isFocusable()) {
+        if (newFocusedElement-&gt;isRootEditableElement() &amp;&amp; !acceptsEditingFocus(newFocusedElement.get())) {
</ins><span class="cx">             // delegate blocks focus change
</span><span class="cx">             focusChangeBlocked = true;
</span><span class="cx">             goto SetFocusedNodeDone;
</span><span class="cx">         }
</span><span class="cx">         // Set focus on the new node
</span><del>-        m_focusedNode = newFocusedNode;
</del><ins>+        m_focusedElement = newFocusedElement;
</ins><span class="cx"> 
</span><span class="cx">         // Dispatch the focus event and let the node do any other focus related activities (important for text fields)
</span><del>-        m_focusedNode-&gt;dispatchFocusEvent(oldFocusedNode, direction);
</del><ins>+        m_focusedElement-&gt;dispatchFocusEvent(oldFocusedElement, direction);
</ins><span class="cx"> 
</span><del>-        if (m_focusedNode != newFocusedNode) {
</del><ins>+        if (m_focusedElement != newFocusedElement) {
</ins><span class="cx">             // handler shifted focus
</span><span class="cx">             focusChangeBlocked = true;
</span><span class="cx">             goto SetFocusedNodeDone;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        m_focusedNode-&gt;dispatchFocusInEvent(eventNames().focusinEvent, oldFocusedNode); // DOM level 3 bubbling focus event.
</del><ins>+        m_focusedElement-&gt;dispatchFocusInEvent(eventNames().focusinEvent, oldFocusedElement); // DOM level 3 bubbling focus event.
</ins><span class="cx"> 
</span><del>-        if (m_focusedNode != newFocusedNode) {
</del><ins>+        if (m_focusedElement != newFocusedElement) {
</ins><span class="cx">             // handler shifted focus
</span><span class="cx">             focusChangeBlocked = true;
</span><span class="cx">             goto SetFocusedNodeDone;
</span><span class="lines">@@ -3412,31 +3406,30 @@
</span><span class="cx"> 
</span><span class="cx">         // FIXME: We should remove firing DOMFocusInEvent event when we are sure no content depends
</span><span class="cx">         // on it, probably when &lt;rdar://problem/8503958&gt; is m.
</span><del>-        m_focusedNode-&gt;dispatchFocusInEvent(eventNames().DOMFocusInEvent, oldFocusedNode); // DOM level 2 for compatibility.
</del><ins>+        m_focusedElement-&gt;dispatchFocusInEvent(eventNames().DOMFocusInEvent, oldFocusedElement); // DOM level 2 for compatibility.
</ins><span class="cx"> 
</span><del>-        if (m_focusedNode != newFocusedNode) { 
</del><ins>+        if (m_focusedElement != newFocusedElement) {
</ins><span class="cx">             // handler shifted focus
</span><span class="cx">             focusChangeBlocked = true;
</span><span class="cx">             goto SetFocusedNodeDone;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (m_focusedNode-&gt;isElementNode())
-            toElement(m_focusedNode.get())-&gt;setFocus(true);
</del><ins>+        m_focusedElement-&gt;setFocus(true);
</ins><span class="cx"> 
</span><del>-        if (m_focusedNode-&gt;isRootEditableElement())
</del><ins>+        if (m_focusedElement-&gt;isRootEditableElement())
</ins><span class="cx">             frame()-&gt;editor().didBeginEditing();
</span><span class="cx"> 
</span><span class="cx">         // eww, I suck. set the qt focus correctly
</span><span class="cx">         // ### find a better place in the code for this
</span><span class="cx">         if (view()) {
</span><del>-            Widget* focusWidget = widgetForNode(m_focusedNode.get());
</del><ins>+            Widget* focusWidget = widgetForNode(m_focusedElement.get());
</ins><span class="cx">             if (focusWidget) {
</span><span class="cx">                 // Make sure a widget has the right size before giving it focus.
</span><span class="cx">                 // Otherwise, we are testing edge cases of the Widget code.
</span><span class="cx">                 // Specifically, in WebCore this does not work well for text fields.
</span><span class="cx">                 updateLayout();
</span><span class="cx">                 // Re-get the widget in case updating the layout changed things.
</span><del>-                focusWidget = widgetForNode(m_focusedNode.get());
</del><ins>+                focusWidget = widgetForNode(m_focusedElement.get());
</ins><span class="cx">             }
</span><span class="cx">             if (focusWidget)
</span><span class="cx">                 focusWidget-&gt;setFocus(true);
</span><span class="lines">@@ -3445,14 +3438,14 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!focusChangeBlocked &amp;&amp; m_focusedNode) {
</del><ins>+    if (!focusChangeBlocked &amp;&amp; m_focusedElement) {
</ins><span class="cx">         // Create the AXObject cache in a focus change because GTK relies on it.
</span><span class="cx">         if (AXObjectCache* cache = axObjectCache())
</span><del>-            cache-&gt;handleFocusedUIElementChanged(oldFocusedNode.get(), newFocusedNode.get());
</del><ins>+            cache-&gt;handleFocusedUIElementChanged(oldFocusedElement.get(), newFocusedElement.get());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!focusChangeBlocked)
</span><del>-        page()-&gt;chrome().focusedNodeChanged(m_focusedNode.get());
</del><ins>+        page()-&gt;chrome().focusedNodeChanged(m_focusedElement.get());
</ins><span class="cx"> 
</span><span class="cx"> SetFocusedNodeDone:
</span><span class="cx">     updateStyleIfNeeded();
</span><span class="lines">@@ -4703,15 +4696,11 @@
</span><span class="cx"> 
</span><span class="cx"> void Document::updateFocusAppearanceTimerFired(Timer&lt;Document&gt;*)
</span><span class="cx"> {
</span><del>-    Node* node = focusedNode();
-    if (!node)
</del><ins>+    Element* element = focusedElement();
+    if (!element)
</ins><span class="cx">         return;
</span><del>-    if (!node-&gt;isElementNode())
-        return;
</del><span class="cx"> 
</span><span class="cx">     updateLayout();
</span><del>-
-    Element* element = toElement(node);
</del><span class="cx">     if (element-&gt;isFocusable())
</span><span class="cx">         element-&gt;updateFocusAppearance(m_updateFocusAppearanceRestoresSelection);
</span><span class="cx"> }
</span><span class="lines">@@ -5766,7 +5755,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!doc)
</span><span class="cx">         return 0;
</span><del>-    Node* node = doc-&gt;focusedNode();
</del><ins>+    Node* node = doc-&gt;focusedElement();
</ins><span class="cx">     if (!node &amp;&amp; doc-&gt;isPluginDocument()) {
</span><span class="cx">         PluginDocument* pluginDocument = toPluginDocument(doc);
</span><span class="cx">         node = pluginDocument-&gt;pluginElement();
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/dom/Document.h        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -670,8 +670,8 @@
</span><span class="cx">     String selectedStylesheetSet() const;
</span><span class="cx">     void setSelectedStylesheetSet(const String&amp;);
</span><span class="cx"> 
</span><del>-    bool setFocusedNode(PassRefPtr&lt;Node&gt;, FocusDirection = FocusDirectionNone);
-    Node* focusedNode() const { return m_focusedNode.get(); }
</del><ins>+    bool setFocusedElement(PassRefPtr&lt;Element&gt;, FocusDirection = FocusDirectionNone);
+    Element* focusedElement() const { return m_focusedElement.get(); }
</ins><span class="cx">     UserActionElementSet&amp; userActionElements()  { return m_userActionElements; }
</span><span class="cx">     const UserActionElementSet&amp; userActionElements() const { return m_userActionElements; }
</span><span class="cx"> 
</span><span class="lines">@@ -1345,7 +1345,7 @@
</span><span class="cx"> 
</span><span class="cx">     Color m_textColor;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;Node&gt; m_focusedNode;
</del><ins>+    RefPtr&lt;Element&gt; m_focusedElement;
</ins><span class="cx">     RefPtr&lt;Element&gt; m_hoveredElement;
</span><span class="cx">     RefPtr&lt;Element&gt; m_activeElement;
</span><span class="cx">     RefPtr&lt;Element&gt; m_documentElement;
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/dom/Element.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1443,7 +1443,7 @@
</span><span class="cx">     if (hasRareData()) {   
</span><span class="cx">         ElementRareData* data = elementRareData();
</span><span class="cx">         if (data-&gt;needsFocusAppearanceUpdateSoonAfterAttach()) {
</span><del>-            if (isFocusable() &amp;&amp; document()-&gt;focusedNode() == this)
</del><ins>+            if (isFocusable() &amp;&amp; document()-&gt;focusedElement() == this)
</ins><span class="cx">                 document()-&gt;updateFocusAppearanceSoon(false /* don't restore selection */);
</span><span class="cx">             data-&gt;setNeedsFocusAppearanceUpdateSoonAfterAttach(false);
</span><span class="cx">         }
</span><span class="lines">@@ -2087,7 +2087,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Document* doc = document();
</span><del>-    if (doc-&gt;focusedNode() == this)
</del><ins>+    if (doc-&gt;focusedElement() == this)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // If the stylesheets have already been loaded we can reliably check isFocusable.
</span><span class="lines">@@ -2154,7 +2154,7 @@
</span><span class="cx">         if (doc-&gt;frame())
</span><span class="cx">             doc-&gt;frame()-&gt;page()-&gt;focusController()-&gt;setFocusedElement(0, doc-&gt;frame());
</span><span class="cx">         else
</span><del>-            doc-&gt;setFocusedNode(0);
</del><ins>+            doc-&gt;setFocusedElement(0);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2407,7 +2407,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (hasRareData())
</span><span class="cx">         elementRareData()-&gt;setNeedsFocusAppearanceUpdateSoonAfterAttach(false);
</span><del>-    if (document()-&gt;focusedNode() == this)
</del><ins>+    if (document()-&gt;focusedElement() == this)
</ins><span class="cx">         document()-&gt;cancelFocusAppearanceUpdate();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/dom/Node.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -685,7 +685,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Ideally we'd call ASSERT(!needsStyleRecalc()) here, but
</span><span class="cx">     // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion
</span><del>-    // would fire in the middle of Document::setFocusedNode().
</del><ins>+    // would fire in the middle of Document::setFocusedElement().
</ins><span class="cx"> 
</span><span class="cx">     for (const Node* node = this; node; node = node-&gt;parentNode()) {
</span><span class="cx">         if ((node-&gt;isHTMLElement() || node-&gt;isDocumentNode()) &amp;&amp; node-&gt;renderer()) {
</span></span></pre></div>
<a id="trunkSourceWebCoredomTreeScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TreeScope.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TreeScope.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/dom/TreeScope.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -392,11 +392,8 @@
</span><span class="cx"> Element* TreeScope::focusedElement()
</span><span class="cx"> {
</span><span class="cx">     Document* document = rootNode()-&gt;document();
</span><del>-    Node* node = document-&gt;focusedNode();
</del><ins>+    Element* element = document-&gt;focusedElement();
</ins><span class="cx"> 
</span><del>-    ASSERT(!node || node-&gt;isElementNode());
-    Element* element = toElement(node);
-
</del><span class="cx">     if (!element &amp;&amp; document-&gt;page())
</span><span class="cx">         element = focusedFrameOwnerElement(document-&gt;page()-&gt;focusController()-&gt;focusedFrame(), document-&gt;frame());
</span><span class="cx">     if (!element)
</span></span></pre></div>
<a id="trunkSourceWebCoredomUserTypingGestureIndicatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/UserTypingGestureIndicator.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/UserTypingGestureIndicator.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/dom/UserTypingGestureIndicator.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -27,8 +27,8 @@
</span><span class="cx"> #include &quot;UserTypingGestureIndicator.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Document.h&quot;
</span><ins>+#include &quot;Element.h&quot;
</ins><span class="cx"> #include &quot;Frame.h&quot;
</span><del>-#include &quot;Node.h&quot;
</del><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">     , m_previousFocusedNode(focusedNode())
</span><span class="cx"> {
</span><span class="cx">     s_processingUserTypingGesture = true;
</span><del>-    focusedNode() = frame-&gt;document() ? frame-&gt;document()-&gt;focusedNode() : 0;
</del><ins>+    focusedNode() = frame-&gt;document() ? frame-&gt;document()-&gt;focusedElement() : 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> UserTypingGestureIndicator::~UserTypingGestureIndicator()
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/editing/Editor.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1369,12 +1369,12 @@
</span><span class="cx"> 
</span><span class="cx"> void Editor::setBaseWritingDirection(WritingDirection direction)
</span><span class="cx"> {
</span><del>-    Node* focusedNode = frame()-&gt;document()-&gt;focusedNode();
-    if (focusedNode &amp;&amp; isHTMLTextFormControlElement(focusedNode)) {
</del><ins>+    Element* focusedElement = frame()-&gt;document()-&gt;focusedElement();
+    if (focusedElement &amp;&amp; isHTMLTextFormControlElement(focusedElement)) {
</ins><span class="cx">         if (direction == NaturalWritingDirection)
</span><span class="cx">             return;
</span><del>-        toHTMLElement(focusedNode)-&gt;setAttribute(dirAttr, direction == LeftToRightWritingDirection ? &quot;ltr&quot; : &quot;rtl&quot;);
-        focusedNode-&gt;dispatchInputEvent();
</del><ins>+        toHTMLElement(focusedElement)-&gt;setAttribute(dirAttr, direction == LeftToRightWritingDirection ? &quot;ltr&quot; : &quot;rtl&quot;);
+        focusedElement-&gt;dispatchInputEvent();
</ins><span class="cx">         frame()-&gt;document()-&gt;updateStyleIfNeeded();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -1480,7 +1480,7 @@
</span><span class="cx">     // Dispatch a compositionend event to the focused node.
</span><span class="cx">     // We should send this event before sending a TextEvent as written in Section 6.2.2 and 6.2.3 of
</span><span class="cx">     // the DOM Event specification.
</span><del>-    Node* target = m_frame-&gt;document()-&gt;focusedNode();
</del><ins>+    Element* target = m_frame-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     if (target) {
</span><span class="cx">         RefPtr&lt;CompositionEvent&gt; event = CompositionEvent::create(eventNames().compositionendEvent, m_frame-&gt;document()-&gt;domWindow(), text);
</span><span class="cx">         target-&gt;dispatchEvent(event, IGNORE_EXCEPTION);
</span><span class="lines">@@ -1522,7 +1522,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Node* target = m_frame-&gt;document()-&gt;focusedNode();
</del><ins>+    Element* target = m_frame-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     if (target) {
</span><span class="cx">         // Dispatch an appropriate composition event to the focused node.
</span><span class="cx">         // We check the composition status and choose an appropriate composition event since this
</span><span class="lines">@@ -1905,7 +1905,7 @@
</span><span class="cx">         return TextCheckingHelper(client(), range).guessesForMisspelledOrUngrammaticalRange(isGrammarCheckingEnabled(), misspelled, ungrammatical);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    String misspelledWord = behavior().shouldAllowSpellingSuggestionsWithoutSelection() ? misspelledWordAtCaretOrRange(m_frame-&gt;document()-&gt;focusedNode()) : misspelledSelectionString();
</del><ins>+    String misspelledWord = behavior().shouldAllowSpellingSuggestionsWithoutSelection() ? misspelledWordAtCaretOrRange(m_frame-&gt;document()-&gt;focusedElement()) : misspelledSelectionString();
</ins><span class="cx">     misspelled = !misspelledWord.isEmpty();
</span><span class="cx"> 
</span><span class="cx">     if (misspelled) {
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditorCommand.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditorCommand.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/editing/EditorCommand.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -249,16 +249,16 @@
</span><span class="cx"> 
</span><span class="cx"> static unsigned verticalScrollDistance(Frame* frame)
</span><span class="cx"> {
</span><del>-    Node* focusedNode = frame-&gt;document()-&gt;focusedNode();
-    if (!focusedNode)
</del><ins>+    Element* focusedElement = frame-&gt;document()-&gt;focusedElement();
+    if (!focusedElement)
</ins><span class="cx">         return 0;
</span><del>-    RenderObject* renderer = focusedNode-&gt;renderer();
</del><ins>+    RenderObject* renderer = focusedElement-&gt;renderer();
</ins><span class="cx">     if (!renderer || !renderer-&gt;isBox())
</span><span class="cx">         return 0;
</span><span class="cx">     RenderStyle* style = renderer-&gt;style();
</span><span class="cx">     if (!style)
</span><span class="cx">         return 0;
</span><del>-    if (!(style-&gt;overflowY() == OSCROLL || style-&gt;overflowY() == OAUTO || focusedNode-&gt;rendererIsEditable()))
</del><ins>+    if (!(style-&gt;overflowY() == OSCROLL || style-&gt;overflowY() == OAUTO || focusedElement-&gt;rendererIsEditable()))
</ins><span class="cx">         return 0;
</span><span class="cx">     int height = std::min&lt;int&gt;(toRenderBox(renderer)-&gt;clientHeight(), frame-&gt;view()-&gt;visibleHeight());
</span><span class="cx">     return static_cast&lt;unsigned&gt;(max(max&lt;int&gt;(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()), 1));
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1633,8 +1633,8 @@
</span><span class="cx"> {
</span><span class="cx">     Document* document = m_frame-&gt;document();
</span><span class="cx"> 
</span><del>-    if (document-&gt;focusedNode() &amp;&amp; document-&gt;focusedNode()-&gt;hasTagName(selectTag)) {
-        HTMLSelectElement* selectElement = toHTMLSelectElement(document-&gt;focusedNode());
</del><ins>+    if (document-&gt;focusedElement() &amp;&amp; document-&gt;focusedElement()-&gt;hasTagName(selectTag)) {
+        HTMLSelectElement* selectElement = toHTMLSelectElement(document-&gt;focusedElement());
</ins><span class="cx">         if (selectElement-&gt;canSelectAll()) {
</span><span class="cx">             selectElement-&gt;selectAll();
</span><span class="cx">             return;
</span><span class="lines">@@ -1722,9 +1722,9 @@
</span><span class="cx">     // Because StyleResolver::checkOneSelector() and
</span><span class="cx">     // RenderTheme::isFocused() check if the frame is active, we have to
</span><span class="cx">     // update style and theme state that depended on those.
</span><del>-    if (Node* node = m_frame-&gt;document()-&gt;focusedNode()) {
-        node-&gt;setNeedsStyleRecalc();
-        if (RenderObject* renderer = node-&gt;renderer())
</del><ins>+    if (Element* element = m_frame-&gt;document()-&gt;focusedElement()) {
+        element-&gt;setNeedsStyleRecalc();
+        if (RenderObject* renderer = element-&gt;renderer())
</ins><span class="cx">             if (renderer &amp;&amp; renderer-&gt;style()-&gt;hasAppearance())
</span><span class="cx">                 renderer-&gt;theme()-&gt;stateChanged(renderer, FocusState);
</span><span class="cx">     }
</span><span class="lines">@@ -1901,7 +1901,7 @@
</span><span class="cx">             }
</span><span class="cx">             target = target-&gt;parentOrShadowHostElement();
</span><span class="cx">         }
</span><del>-        m_frame-&gt;document()-&gt;setFocusedNode(0);
</del><ins>+        m_frame-&gt;document()-&gt;setFocusedElement(0);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (caretBrowsing)
</span><span class="lines">@@ -1987,7 +1987,7 @@
</span><span class="cx"> HTMLFormElement* FrameSelection::currentForm() const
</span><span class="cx"> {
</span><span class="cx">     // Start looking either at the active (first responder) node, or where the selection is.
</span><del>-    Node* start = m_frame-&gt;document()-&gt;focusedNode();
</del><ins>+    Node* start = m_frame-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     if (!start)
</span><span class="cx">         start = this-&gt;start().deprecatedNode();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryCachedPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/CachedPage.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/CachedPage.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/history/CachedPage.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -84,10 +84,8 @@
</span><span class="cx">     // Restore the focus appearance for the focused element.
</span><span class="cx">     // FIXME: Right now we don't support pages w/ frames in the b/f cache.  This may need to be tweaked when we add support for that.
</span><span class="cx">     Document* focusedDocument = page-&gt;focusController()-&gt;focusedOrMainFrame()-&gt;document();
</span><del>-    if (Node* node = focusedDocument-&gt;focusedNode()) {
-        if (node-&gt;isElementNode())
-            toElement(node)-&gt;updateFocusAppearance(true);
-    }
</del><ins>+    if (Element* element = focusedDocument-&gt;focusedElement())
+        element-&gt;updateFocusAppearance(true);
</ins><span class="cx"> 
</span><span class="cx">     if (m_needStyleRecalcForVisitedLinks) {
</span><span class="cx">         for (Frame* frame = page-&gt;mainFrame(); frame; frame = frame-&gt;tree()-&gt;traverseNext())
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -537,7 +537,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (wasAttached) {
</span><span class="cx">         attach();
</span><del>-        if (document()-&gt;focusedNode() == this)
</del><ins>+        if (document()-&gt;focusedElement() == this)
</ins><span class="cx">             updateFocusAppearance(true);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -813,7 +813,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_inputType-&gt;attach();
</span><span class="cx"> 
</span><del>-    if (document()-&gt;focusedNode() == this)
</del><ins>+    if (document()-&gt;focusedElement() == this)
</ins><span class="cx">         document()-&gt;updateFocusAppearanceSoon(true /* restore selection */);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextAreaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -389,7 +389,7 @@
</span><span class="cx">     setFormControlValueMatchesRenderer(true);
</span><span class="cx"> 
</span><span class="cx">     // Set the caret to the end of the text value.
</span><del>-    if (document()-&gt;focusedNode() == this) {
</del><ins>+    if (document()-&gt;focusedElement() == this) {
</ins><span class="cx">         unsigned endOfString = m_value.length();
</span><span class="cx">         setSelectionRange(endOfString, endOfString);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">         &amp;&amp; isEmptyValue()
</span><span class="cx">         &amp;&amp; isEmptySuggestedValue()
</span><span class="cx">         &amp;&amp; !isPlaceholderEmpty()
</span><del>-        &amp;&amp; (document()-&gt;focusedNode() != this || (renderer() &amp;&amp; renderer()-&gt;theme()-&gt;shouldShowPlaceholderWhenFocused()))
</del><ins>+        &amp;&amp; (document()-&gt;focusedElement() != this || (renderer() &amp;&amp; renderer()-&gt;theme()-&gt;shouldShowPlaceholderWhenFocused()))
</ins><span class="cx">         &amp;&amp; (!renderer() || renderer()-&gt;style()-&gt;visibility() == VISIBLE);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -362,7 +362,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!isTextFormControl())
</span><span class="cx">         return 0;
</span><del>-    if (document()-&gt;focusedNode() != this &amp;&amp; hasCachedSelection())
</del><ins>+    if (document()-&gt;focusedElement() != this &amp;&amp; hasCachedSelection())
</ins><span class="cx">         return m_cachedSelectionStart;
</span><span class="cx"> 
</span><span class="cx">     return computeSelectionStart();
</span><span class="lines">@@ -382,7 +382,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!isTextFormControl())
</span><span class="cx">         return 0;
</span><del>-    if (document()-&gt;focusedNode() != this &amp;&amp; hasCachedSelection())
</del><ins>+    if (document()-&gt;focusedElement() != this &amp;&amp; hasCachedSelection())
</ins><span class="cx">         return m_cachedSelectionEnd;
</span><span class="cx">     return computeSelectionEnd();
</span><span class="cx"> }
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!isTextFormControl())
</span><span class="cx">         return directionString(SelectionHasNoDirection);
</span><del>-    if (document()-&gt;focusedNode() != this &amp;&amp; hasCachedSelection())
</del><ins>+    if (document()-&gt;focusedElement() != this &amp;&amp; hasCachedSelection())
</ins><span class="cx">         return directionString(m_cachedSelectionDirection);
</span><span class="cx"> 
</span><span class="cx">     return directionString(computeSelectionDirection());
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlRadioInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/RadioInputType.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/RadioInputType.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/html/RadioInputType.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">         if (inputElement-&gt;form() != element()-&gt;form())
</span><span class="cx">             break;
</span><span class="cx">         if (inputElement-&gt;isRadioButton() &amp;&amp; inputElement-&gt;name() == element()-&gt;name() &amp;&amp; inputElement-&gt;isFocusable()) {
</span><del>-            document-&gt;setFocusedNode(inputElement);
</del><ins>+            document-&gt;setFocusedElement(inputElement);
</ins><span class="cx">             inputElement-&gt;dispatchSimulatedClick(event, SendNoEvents, DoNotShowPressedLook);
</span><span class="cx">             event-&gt;setDefaultHandled();
</span><span class="cx">             return;
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Never allow keyboard tabbing to leave you in the same radio group.  Always
</span><span class="cx">     // skip any other elements in the group.
</span><del>-    Node* currentFocusedNode = element()-&gt;document()-&gt;focusedNode();
</del><ins>+    Element* currentFocusedNode = element()-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     if (currentFocusedNode &amp;&amp; currentFocusedNode-&gt;hasTagName(inputTag)) {
</span><span class="cx">         HTMLInputElement* focusedInput = static_cast&lt;HTMLInputElement*&gt;(currentFocusedNode);
</span><span class="cx">         if (focusedInput-&gt;isRadioButton() &amp;&amp; focusedInput-&gt;form() == element()-&gt;form() &amp;&amp; focusedInput-&gt;name() == element()-&gt;name())
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowDateTimeEditElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -577,7 +577,7 @@
</span><span class="cx"> 
</span><span class="cx"> size_t DateTimeEditElement::focusedFieldIndex() const
</span><span class="cx"> {
</span><del>-    Node* const focusedFieldNode = document()-&gt;focusedNode();
</del><ins>+    Node* const focusedFieldNode = document()-&gt;focusedElement();
</ins><span class="cx">     for (size_t fieldIndex = 0; fieldIndex &lt; m_fields.size(); ++fieldIndex) {
</span><span class="cx">         if (m_fields[fieldIndex] == focusedFieldNode)
</span><span class="cx">             return fieldIndex;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -394,9 +394,9 @@
</span><span class="cx">     if (unloadEventPolicy != UnloadEventPolicyNone) {
</span><span class="cx">         if (m_frame-&gt;document()) {
</span><span class="cx">             if (m_didCallImplicitClose &amp;&amp; !m_wasUnloadEventEmitted) {
</span><del>-                Node* currentFocusedNode = m_frame-&gt;document()-&gt;focusedNode();
-                if (currentFocusedNode &amp;&amp; currentFocusedNode-&gt;toInputElement())
-                    currentFocusedNode-&gt;toInputElement()-&gt;endEditing();
</del><ins>+                Element* currentFocusedElement = m_frame-&gt;document()-&gt;focusedElement();
+                if (currentFocusedElement &amp;&amp; currentFocusedElement-&gt;toInputElement())
+                    currentFocusedElement-&gt;toInputElement()-&gt;endEditing();
</ins><span class="cx">                 if (m_pageDismissalEventBeingDispatched == NoDismissal) {
</span><span class="cx">                     if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide) {
</span><span class="cx">                         m_pageDismissalEventBeingDispatched = PageHideDismissal;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -944,7 +944,7 @@
</span><span class="cx">     // Clear the current frame's focused node if a new frame is about to be focused.
</span><span class="cx">     Frame* focusedFrame = page-&gt;focusController()-&gt;focusedFrame();
</span><span class="cx">     if (focusedFrame &amp;&amp; focusedFrame != m_frame)
</span><del>-        focusedFrame-&gt;document()-&gt;setFocusedNode(0);
</del><ins>+        focusedFrame-&gt;document()-&gt;setFocusedElement(0);
</ins><span class="cx"> 
</span><span class="cx">     m_frame-&gt;eventHandler()-&gt;focusDocumentView();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1084,7 +1084,7 @@
</span><span class="cx">     Node* node = startingNode;
</span><span class="cx"> 
</span><span class="cx">     if (!node)
</span><del>-        node = m_frame-&gt;document()-&gt;focusedNode();
</del><ins>+        node = m_frame-&gt;document()-&gt;focusedElement();
</ins><span class="cx"> 
</span><span class="cx">     if (!node)
</span><span class="cx">         node = m_mousePressNode.get();
</span><span class="lines">@@ -1105,7 +1105,7 @@
</span><span class="cx">     Node* node = startingNode;
</span><span class="cx"> 
</span><span class="cx">     if (!node)
</span><del>-        node = m_frame-&gt;document()-&gt;focusedNode();
</del><ins>+        node = m_frame-&gt;document()-&gt;focusedElement();
</ins><span class="cx"> 
</span><span class="cx">     if (!node)
</span><span class="cx">         node = m_mousePressNode.get();
</span><span class="lines">@@ -2346,7 +2346,7 @@
</span><span class="cx">                 // will set a selection inside it, which will call setFocuseNodeIfNeeded.
</span><span class="cx">                 if (m_frame-&gt;selection()-&gt;isRange()
</span><span class="cx">                     &amp;&amp; m_frame-&gt;selection()-&gt;toNormalizedRange()-&gt;compareNode(element, IGNORE_EXCEPTION) == Range::NODE_INSIDE
</span><del>-                    &amp;&amp; element-&gt;isDescendantOf(m_frame-&gt;document()-&gt;focusedNode()))
</del><ins>+                    &amp;&amp; element-&gt;isDescendantOf(m_frame-&gt;document()-&gt;focusedElement()))
</ins><span class="cx">                     return true;
</span><span class="cx">                     
</span><span class="cx">                 break;
</span><span class="lines">@@ -2945,7 +2945,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     IntPoint location;
</span><span class="cx"> 
</span><del>-    Node* focusedNode = doc-&gt;focusedNode();
</del><ins>+    Element* focusedElement = doc-&gt;focusedElement();
</ins><span class="cx">     FrameSelection* selection = m_frame-&gt;selection();
</span><span class="cx">     Position start = selection-&gt;selection().start();
</span><span class="cx"> 
</span><span class="lines">@@ -2957,8 +2957,8 @@
</span><span class="cx">         // In a multiline edit, firstRect.maxY() would endup on the next line, so -1.
</span><span class="cx">         int y = firstRect.maxY() ? firstRect.maxY() - 1 : 0;
</span><span class="cx">         location = IntPoint(x, y);
</span><del>-    } else if (focusedNode) {
-        RenderBoxModelObject* box = focusedNode-&gt;renderBoxModelObject();
</del><ins>+    } else if (focusedElement) {
+        RenderBoxModelObject* box = focusedElement-&gt;renderBoxModelObject();
</ins><span class="cx">         if (!box)
</span><span class="cx">             return false;
</span><span class="cx">         IntRect clippedRect = box-&gt;pixelSnappedAbsoluteClippedOverflowRect();
</span><span class="lines">@@ -2974,7 +2974,7 @@
</span><span class="cx">     IntPoint position = view-&gt;contentsToRootView(location);
</span><span class="cx">     IntPoint globalPosition = view-&gt;hostWindow()-&gt;rootViewToScreen(IntRect(position, IntSize())).location();
</span><span class="cx"> 
</span><del>-    Node* targetNode = doc-&gt;focusedNode();
</del><ins>+    Node* targetNode = doc-&gt;focusedElement();
</ins><span class="cx">     if (!targetNode)
</span><span class="cx">         targetNode = doc;
</span><span class="cx"> 
</span><span class="lines">@@ -3775,8 +3775,8 @@
</span><span class="cx"> void EventHandler::capsLockStateMayHaveChanged()
</span><span class="cx"> {
</span><span class="cx">     Document* d = m_frame-&gt;document();
</span><del>-    if (Node* node = d-&gt;focusedNode()) {
-        if (RenderObject* r = node-&gt;renderer()) {
</del><ins>+    if (Element* element = d-&gt;focusedElement()) {
+        if (RenderObject* r = element-&gt;renderer()) {
</ins><span class="cx">             if (r-&gt;isTextField())
</span><span class="cx">                 toRenderTextControlSingleLine(r)-&gt;capsLockStateMayHaveChanged();
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorepageFocusControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FocusController.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FocusController.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/page/FocusController.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -122,11 +122,11 @@
</span><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!focused &amp;&amp; document-&gt;focusedNode())
-        document-&gt;focusedNode()-&gt;dispatchBlurEvent(0);
</del><ins>+    if (!focused &amp;&amp; document-&gt;focusedElement())
+        document-&gt;focusedElement()-&gt;dispatchBlurEvent(0);
</ins><span class="cx">     document-&gt;dispatchWindowEvent(Event::create(focused ? eventNames().focusEvent : eventNames().blurEvent, false, false));
</span><del>-    if (focused &amp;&amp; document-&gt;focusedNode())
-        document-&gt;focusedNode()-&gt;dispatchFocusEvent(0, FocusDirectionNone);
</del><ins>+    if (focused &amp;&amp; document-&gt;focusedElement())
+        document-&gt;focusedElement()-&gt;dispatchFocusEvent(0, FocusDirectionNone);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline bool hasCustomFocusLogic(Node* node)
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx">     ASSERT(frame);
</span><span class="cx">     Document* document = frame-&gt;document();
</span><span class="cx"> 
</span><del>-    Node* currentNode = document-&gt;focusedNode();
</del><ins>+    Node* currentNode = document-&gt;focusedElement();
</ins><span class="cx">     // FIXME: Not quite correct when it comes to focus transitions leaving/entering the WebView itself
</span><span class="cx">     bool caretBrowsing = frame-&gt;settings() &amp;&amp; frame-&gt;settings()-&gt;caretBrowsingEnabled();
</span><span class="cx"> 
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx">     if (!node) {
</span><span class="cx">         // We didn't find a node to focus, so we should try to pass focus to Chrome.
</span><span class="cx">         if (!initialFocus &amp;&amp; m_page-&gt;chrome().canTakeFocus(direction)) {
</span><del>-            document-&gt;setFocusedNode(0);
</del><ins>+            document-&gt;setFocusedElement(0);
</ins><span class="cx">             setFocusedFrame(0);
</span><span class="cx">             m_page-&gt;chrome().takeFocus(direction);
</span><span class="cx">             return true;
</span><span class="lines">@@ -314,7 +314,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(node);
</span><span class="cx"> 
</span><del>-    if (node == document-&gt;focusedNode())
</del><ins>+    if (node == document-&gt;focusedElement())
</ins><span class="cx">         // Focus wrapped around to the same node.
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="lines">@@ -331,12 +331,12 @@
</span><span class="cx">         if (!owner-&gt;contentFrame())
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        document-&gt;setFocusedNode(0);
</del><ins>+        document-&gt;setFocusedElement(0);
</ins><span class="cx">         setFocusedFrame(owner-&gt;contentFrame());
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    // FIXME: It would be nice to just be able to call setFocusedNode(node) here, but we can't do
</del><ins>+    // FIXME: It would be nice to just be able to call setFocusedElement(node) here, but we can't do
</ins><span class="cx">     // that because some elements (e.g. HTMLInputElement and HTMLTextAreaElement) do extra work in
</span><span class="cx">     // their focus() methods.
</span><span class="cx"> 
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (newDocument != document)
</span><span class="cx">         // Focus is going away from this document, so clear the focused node.
</span><del>-        document-&gt;setFocusedNode(0);
</del><ins>+        document-&gt;setFocusedElement(0);
</ins><span class="cx"> 
</span><span class="cx">     if (newDocument)
</span><span class="cx">         setFocusedFrame(newDocument-&gt;frame());
</span><span class="lines">@@ -595,12 +595,12 @@
</span><span class="cx">     RefPtr&lt;Frame&gt; oldFocusedFrame = focusedFrame();
</span><span class="cx">     RefPtr&lt;Document&gt; oldDocument = oldFocusedFrame ? oldFocusedFrame-&gt;document() : 0;
</span><span class="cx">     
</span><del>-    Node* oldFocusedNode = oldDocument ? oldDocument-&gt;focusedNode() : 0;
-    if (oldFocusedNode == element)
</del><ins>+    Element* oldFocusedElement = oldDocument ? oldDocument-&gt;focusedElement() : 0;
+    if (oldFocusedElement == element)
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Might want to disable this check for caretBrowsing
</span><del>-    if (oldFocusedNode &amp;&amp; oldFocusedNode-&gt;isRootEditableElement() &amp;&amp; !relinquishesEditingFocus(oldFocusedNode))
</del><ins>+    if (oldFocusedElement &amp;&amp; oldFocusedElement-&gt;isRootEditableElement() &amp;&amp; !relinquishesEditingFocus(oldFocusedElement))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     m_page-&gt;editorClient()-&gt;willSetInputMethodState();
</span><span class="lines">@@ -609,20 +609,20 @@
</span><span class="cx"> 
</span><span class="cx">     if (!element) {
</span><span class="cx">         if (oldDocument)
</span><del>-            oldDocument-&gt;setFocusedNode(0);
</del><ins>+            oldDocument-&gt;setFocusedElement(0);
</ins><span class="cx">         m_page-&gt;editorClient()-&gt;setInputMethodState(false);
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Document&gt; newDocument = element-&gt;document();
</span><span class="cx"> 
</span><del>-    if (newDocument &amp;&amp; newDocument-&gt;focusedNode() == element) {
</del><ins>+    if (newDocument &amp;&amp; newDocument-&gt;focusedElement() == element) {
</ins><span class="cx">         m_page-&gt;editorClient()-&gt;setInputMethodState(element-&gt;shouldUseInputMethod());
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (oldDocument &amp;&amp; oldDocument != newDocument)
</span><del>-        oldDocument-&gt;setFocusedNode(0);
</del><ins>+        oldDocument-&gt;setFocusedElement(0);
</ins><span class="cx"> 
</span><span class="cx">     if (newFocusedFrame &amp;&amp; !newFocusedFrame-&gt;page()) {
</span><span class="cx">         setFocusedFrame(0);
</span><span class="lines">@@ -632,12 +632,12 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Element&gt; protect(element);
</span><span class="cx">     if (newDocument) {
</span><del>-        bool successfullyFocused = newDocument-&gt;setFocusedNode(element, direction);
</del><ins>+        bool successfullyFocused = newDocument-&gt;setFocusedElement(element, direction);
</ins><span class="cx">         if (!successfullyFocused)
</span><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (newDocument-&gt;focusedNode() == element)
</del><ins>+    if (newDocument-&gt;focusedElement() == element)
</ins><span class="cx">         m_page-&gt;editorClient()-&gt;setInputMethodState(element-&gt;shouldUseInputMethod());
</span><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="lines">@@ -754,7 +754,7 @@
</span><span class="cx"> void FocusController::findFocusCandidateInContainer(Node* container, const LayoutRect&amp; startingRect, FocusDirection direction, KeyboardEvent* event, FocusCandidate&amp; closest)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(container);
</span><del>-    Node* focusedNode = (focusedFrame() &amp;&amp; focusedFrame()-&gt;document()) ? focusedFrame()-&gt;document()-&gt;focusedNode() : 0;
</del><ins>+    Node* focusedNode = (focusedFrame() &amp;&amp; focusedFrame()-&gt;document()) ? focusedFrame()-&gt;document()-&gt;focusedElement() : 0;
</ins><span class="cx"> 
</span><span class="cx">     Element* element = ElementTraversal::firstWithin(container);
</span><span class="cx">     FocusCandidate current;
</span><span class="lines">@@ -813,9 +813,9 @@
</span><span class="cx">         }
</span><span class="cx">         // Navigate into a new frame.
</span><span class="cx">         LayoutRect rect;
</span><del>-        Node* focusedNode = focusedOrMainFrame()-&gt;document()-&gt;focusedNode();
-        if (focusedNode &amp;&amp; !hasOffscreenRect(focusedNode))
-            rect = nodeRectInAbsoluteCoordinates(focusedNode, true /* ignore border */);
</del><ins>+        Element* focusedElement = focusedOrMainFrame()-&gt;document()-&gt;focusedElement();
+        if (focusedElement &amp;&amp; !hasOffscreenRect(focusedElement))
+            rect = nodeRectInAbsoluteCoordinates(focusedElement, true /* ignore border */);
</ins><span class="cx">         frameElement-&gt;contentFrame()-&gt;document()-&gt;updateLayoutIgnorePendingStylesheets();
</span><span class="cx">         if (!advanceFocusDirectionallyInContainer(frameElement-&gt;contentFrame()-&gt;document(), rect, direction, event)) {
</span><span class="cx">             // The new frame had nothing interesting, need to find another candidate.
</span><span class="lines">@@ -831,9 +831,9 @@
</span><span class="cx">         }
</span><span class="cx">         // Navigate into a new scrollable container.
</span><span class="cx">         LayoutRect startingRect;
</span><del>-        Node* focusedNode = focusedOrMainFrame()-&gt;document()-&gt;focusedNode();
-        if (focusedNode &amp;&amp; !hasOffscreenRect(focusedNode))
-            startingRect = nodeRectInAbsoluteCoordinates(focusedNode, true);
</del><ins>+        Element* focusedElement = focusedOrMainFrame()-&gt;document()-&gt;focusedElement();
+        if (focusedElement &amp;&amp; !hasOffscreenRect(focusedElement))
+            startingRect = nodeRectInAbsoluteCoordinates(focusedElement, true);
</ins><span class="cx">         return advanceFocusDirectionallyInContainer(focusCandidate.visibleNode, startingRect, direction, event);
</span><span class="cx">     }
</span><span class="cx">     if (focusCandidate.isOffscreenAfterScrolling) {
</span><span class="lines">@@ -859,7 +859,7 @@
</span><span class="cx">     if (!focusedDocument)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    Node* focusedNode = focusedDocument-&gt;focusedNode();
</del><ins>+    Element* focusedElement = focusedDocument-&gt;focusedElement();
</ins><span class="cx">     Node* container = focusedDocument;
</span><span class="cx"> 
</span><span class="cx">     if (container-&gt;isDocumentNode())
</span><span class="lines">@@ -867,12 +867,12 @@
</span><span class="cx">         
</span><span class="cx">     // Figure out the starting rect.
</span><span class="cx">     LayoutRect startingRect;
</span><del>-    if (focusedNode) {
-        if (!hasOffscreenRect(focusedNode)) {
-            container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direction, focusedNode);
-            startingRect = nodeRectInAbsoluteCoordinates(focusedNode, true /* ignore border */);
-        } else if (focusedNode-&gt;hasTagName(areaTag)) {
-            HTMLAreaElement* area = static_cast&lt;HTMLAreaElement*&gt;(focusedNode);
</del><ins>+    if (focusedElement) {
+        if (!hasOffscreenRect(focusedElement)) {
+            container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direction, focusedElement);
+            startingRect = nodeRectInAbsoluteCoordinates(focusedElement, true /* ignore border */);
+        } else if (focusedElement-&gt;hasTagName(areaTag)) {
+            HTMLAreaElement* area = static_cast&lt;HTMLAreaElement*&gt;(focusedElement);
</ins><span class="cx">             container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direction, area-&gt;imageElement());
</span><span class="cx">             startingRect = virtualRectForAreaElementAndDirection(area, direction);
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/page/FrameView.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1865,7 +1865,7 @@
</span><span class="cx">     
</span><span class="cx">     // If the anchor accepts keyboard focus, move focus there to aid users relying on keyboard navigation.
</span><span class="cx">     if (anchorElement &amp;&amp; anchorElement-&gt;isFocusable())
</span><del>-        m_frame-&gt;document()-&gt;setFocusedNode(anchorElement);
</del><ins>+        m_frame-&gt;document()-&gt;setFocusedElement(anchorElement);
</ins><span class="cx">     
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/PluginView.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/PluginView.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/plugins/PluginView.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -887,11 +887,10 @@
</span><span class="cx"> 
</span><span class="cx"> void PluginView::focusPluginElement()
</span><span class="cx"> {
</span><del>-    // Focus the plugin
</del><span class="cx">     if (Page* page = m_parentFrame-&gt;page())
</span><span class="cx">         page-&gt;focusController()-&gt;setFocusedElement(m_element, m_parentFrame);
</span><span class="cx">     else
</span><del>-        m_parentFrame-&gt;document()-&gt;setFocusedNode(m_element);
</del><ins>+        m_parentFrame-&gt;document()-&gt;setFocusedElement(m_element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PluginView::didReceiveResponse(const ResourceResponse&amp; response)
</span></span></pre></div>
<a id="trunkSourceWebCorepluginseflPluginViewEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/efl/PluginViewEfl.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/efl/PluginViewEfl.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/plugins/efl/PluginViewEfl.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx"> void PluginView::setFocus(bool focused)
</span><span class="cx"> {
</span><span class="cx">     if (focused)
</span><del>-        m_element-&gt;document()-&gt;setFocusedNode(m_element);
</del><ins>+        m_element-&gt;document()-&gt;setFocusedElement(m_element);
</ins><span class="cx"> 
</span><span class="cx">     Widget::setFocus(focused);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsmacPluginViewMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/mac/PluginViewMac.mm (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/mac/PluginViewMac.mm        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/plugins/mac/PluginViewMac.mm        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -708,7 +708,7 @@
</span><span class="cx">             // The plugin needs focus to receive keyboard events
</span><span class="cx">             if (Page* page = m_parentFrame-&gt;page())
</span><span class="cx">                 page-&gt;focusController()-&gt;setFocusedFrame(m_parentFrame);
</span><del>-            m_parentFrame-&gt;document()-&gt;setFocusedNode(m_element);
</del><ins>+            m_parentFrame-&gt;document()-&gt;setFocusedElement(m_element);
</ins><span class="cx">         } else if (event-&gt;type() == eventNames().mouseupEvent) {
</span><span class="cx">             record.what = mouseUp;
</span><span class="cx">         } else {
</span><span class="lines">@@ -752,7 +752,7 @@
</span><span class="cx">                 // The plugin needs focus to receive keyboard events
</span><span class="cx">                 if (Page* page = m_parentFrame-&gt;page())
</span><span class="cx">                     page-&gt;focusController()-&gt;setFocusedFrame(m_parentFrame);
</span><del>-                m_parentFrame-&gt;document()-&gt;setFocusedNode(m_element);
</del><ins>+                m_parentFrame-&gt;document()-&gt;setFocusedElement(m_element);
</ins><span class="cx">                 break;
</span><span class="cx">                 
</span><span class="cx">             case NSLeftMouseUp:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderImage.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -424,11 +424,11 @@
</span><span class="cx">     if (paintInfo.context-&gt;paintingDisabled() &amp;&amp; !paintInfo.context-&gt;updatingControlTints())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Node* focusedNode = document-&gt;focusedNode();
-    if (!focusedNode || !focusedNode-&gt;hasTagName(areaTag))
</del><ins>+    Element* focusedElement = document-&gt;focusedElement();
+    if (!focusedElement || !focusedElement-&gt;hasTagName(areaTag))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    HTMLAreaElement* areaElement = static_cast&lt;HTMLAreaElement*&gt;(focusedNode);
</del><ins>+    HTMLAreaElement* areaElement = static_cast&lt;HTMLAreaElement*&gt;(focusedElement);
</ins><span class="cx">     if (areaElement-&gt;imageElement() != node())
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx"> 
</span><span class="cx">     Color textColor = element-&gt;renderStyle() ? element-&gt;renderStyle()-&gt;visitedDependentColor(CSSPropertyColor) : style()-&gt;visitedDependentColor(CSSPropertyColor);
</span><span class="cx">     if (isOptionElement &amp;&amp; toHTMLOptionElement(element)-&gt;selected()) {
</span><del>-        if (frame()-&gt;selection()-&gt;isFocusedAndActive() &amp;&amp; document()-&gt;focusedNode() == node())
</del><ins>+        if (frame()-&gt;selection()-&gt;isFocusedAndActive() &amp;&amp; document()-&gt;focusedElement() == node())
</ins><span class="cx">             textColor = theme()-&gt;activeListBoxSelectionForegroundColor();
</span><span class="cx">         // Honor the foreground color for disabled items
</span><span class="cx">         else if (!element-&gt;isDisabledFormControl() &amp;&amp; !select-&gt;isDisabledFormControl())
</span><span class="lines">@@ -445,7 +445,7 @@
</span><span class="cx"> 
</span><span class="cx">     Color backColor;
</span><span class="cx">     if (element-&gt;hasTagName(optionTag) &amp;&amp; toHTMLOptionElement(element)-&gt;selected()) {
</span><del>-        if (frame()-&gt;selection()-&gt;isFocusedAndActive() &amp;&amp; document()-&gt;focusedNode() == node())
</del><ins>+        if (frame()-&gt;selection()-&gt;isFocusedAndActive() &amp;&amp; document()-&gt;focusedElement() == node())
</ins><span class="cx">             backColor = theme()-&gt;activeListBoxSelectionBackgroundColor();
</span><span class="cx">         else
</span><span class="cx">             backColor = theme()-&gt;inactiveListBoxSelectionBackgroundColor();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlSingleLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx">     if (Frame* frame = document()-&gt;frame())
</span><span class="cx">         shouldDrawCapsLockIndicator = inputElement()-&gt;isPasswordField()
</span><span class="cx">                                       &amp;&amp; frame-&gt;selection()-&gt;isFocusedAndActive()
</span><del>-                                      &amp;&amp; document()-&gt;focusedNode() == node()
</del><ins>+                                      &amp;&amp; document()-&gt;focusedElement() == node()
</ins><span class="cx">                                       &amp;&amp; PlatformKeyboardEvent::currentCapsLockState();
</span><span class="cx"> 
</span><span class="cx">     if (shouldDrawCapsLockIndicator != m_shouldDrawCapsLockIndicator) {
</span><span class="lines">@@ -403,7 +403,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool RenderTextControlSingleLine::textShouldBeTruncated() const
</span><span class="cx"> {
</span><del>-    return document()-&gt;focusedNode() != node()
</del><ins>+    return document()-&gt;focusedElement() != node()
</ins><span class="cx">         &amp;&amp; style()-&gt;textOverflow() == TextOverflowEllipsis;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -800,7 +800,7 @@
</span><span class="cx">     Element* focusDelegate = toElement(node)-&gt;focusDelegate();
</span><span class="cx">     Document* document = focusDelegate-&gt;document();
</span><span class="cx">     Frame* frame = document-&gt;frame();
</span><del>-    return focusDelegate == document-&gt;focusedNode() &amp;&amp; frame &amp;&amp; frame-&gt;selection()-&gt;isFocusedAndActive();
</del><ins>+    return focusDelegate == document-&gt;focusedElement() &amp;&amp; frame &amp;&amp; frame-&gt;selection()-&gt;isFocusedAndActive();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderTheme::isPressed(const RenderObject* o) const
</span></span></pre></div>
<a id="trunkSourceWebKitblackberryApiWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -2556,8 +2556,8 @@
</span><span class="cx"> 
</span><span class="cx">     const Platform::ViewportAccessor* viewportAccessor = m_webkitThreadViewportAccessor;
</span><span class="cx"> 
</span><del>-    IntRect focusRect = rectForNode(doc-&gt;focusedNode());
-    focusRect = adjustRectOffsetForFrameOffset(focusRect, doc-&gt;focusedNode());
</del><ins>+    IntRect focusRect = rectForNode(doc-&gt;focusedElement());
+    focusRect = adjustRectOffsetForFrameOffset(focusRect, doc-&gt;focusedElement());
</ins><span class="cx">     focusRect = viewportAccessor-&gt;roundToPixelFromDocumentContents(WebCore::FloatRect(focusRect));
</span><span class="cx">     focusRect.intersect(viewportAccessor-&gt;pixelContentsRect());
</span><span class="cx">     return focusRect;
</span><span class="lines">@@ -2572,7 +2572,7 @@
</span><span class="cx">     // Check if we're using LinkToLink and the user is not touching the screen.
</span><span class="cx">     if (m_webSettings-&gt;doesGetFocusNodeContext() &amp;&amp; !isTouching) {
</span><span class="cx">         RefPtr&lt;Node&gt; node;
</span><del>-        node = m_page-&gt;focusController()-&gt;focusedOrMainFrame()-&gt;document()-&gt;focusedNode();
</del><ins>+        node = m_page-&gt;focusController()-&gt;focusedOrMainFrame()-&gt;document()-&gt;focusedElement();
</ins><span class="cx">         if (node) {
</span><span class="cx">             IntRect visibleRect = IntRect(IntPoint(), actualVisibleSize());
</span><span class="cx">             if (!visibleRect.intersects(getNodeWindowRect(node.get())))
</span><span class="lines">@@ -4168,7 +4168,7 @@
</span><span class="cx">         return;
</span><span class="cx">     ASSERT(frame-&gt;document());
</span><span class="cx"> 
</span><del>-    if (frame-&gt;document()-&gt;focusedNode())
</del><ins>+    if (frame-&gt;document()-&gt;focusedElement())
</ins><span class="cx">         frame-&gt;page()-&gt;focusController()-&gt;setFocusedElement(0, frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4913,7 +4913,7 @@
</span><span class="cx">                 if (nodeImpl-&gt;isElementNode())
</span><span class="cx">                     toElement(nodeImpl)-&gt;updateFocusAppearance(true);
</span><span class="cx">                 d-&gt;m_inputHandler-&gt;didNodeOpenPopup(nodeImpl);
</span><del>-            } else if (doc-&gt;focusedNode() == nodeImpl) // &amp;&amp; !on
</del><ins>+            } else if (doc-&gt;focusedElement() == nodeImpl) // &amp;&amp; !on
</ins><span class="cx">                 page-&gt;focusController()-&gt;setFocusedElement(0, doc-&gt;frame());
</span><span class="cx"> 
</span><span class="cx">             return true;
</span></span></pre></div>
<a id="trunkSourceWebKitblackberryChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/blackberry/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/blackberry/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/blackberry/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::focusNodeRect):
+        (BlackBerry::WebKit::WebPagePrivate::contextNode):
+        (BlackBerry::WebKit::WebPagePrivate::clearFocusNode):
+        (BlackBerry::WebKit::WebPage::setNodeFocus):
+        * WebCoreSupport/EditorClientBlackBerry.cpp:
+        (WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
+        (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
+        * WebKitSupport/SelectionHandler.cpp:
+        (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
+        (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
+        (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
+        (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
+        (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
+        (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
+
</ins><span class="cx"> 2013-05-28  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Fix BlackBerry debug build after r150756.
</span></span></pre></div>
<a id="trunkSourceWebKitblackberryWebCoreSupportEditorClientBlackBerrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     if (!frame || !frame-&gt;document() || !frame-&gt;editor())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const Node* node = frame-&gt;document()-&gt;focusedNode();
</del><ins>+    const Node* node = frame-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     // NOTE: This logic is taken from EditorClientImpl::shouldSpellcheckByDefault
</span><span class="cx">     // If |node| is null, we default to allowing spellchecking. This is done in
</span><span class="cx">     // order to mitigate the issue when the user clicks outside the textbox, as a
</span><span class="lines">@@ -190,10 +190,10 @@
</span><span class="cx"> 
</span><span class="cx">     Frame* frame = m_webPagePrivate-&gt;focusedOrMainFrame();
</span><span class="cx">     if (frame &amp;&amp; frame-&gt;document()) {
</span><del>-        if (Node* focusedNode = frame-&gt;document()-&gt;focusedNode()) {
-            if (focusedNode-&gt;hasTagName(HTMLNames::selectTag))
</del><ins>+        if (Element* focusedElement = frame-&gt;document()-&gt;focusedElement()) {
+            if (focusedElement-&gt;hasTagName(HTMLNames::selectTag))
</ins><span class="cx">                 return false;
</span><del>-            if (focusedNode-&gt;isElementNode() &amp;&amp; DOMSupport::isPopupInputField(toElement(focusedNode)))
</del><ins>+            if (DOMSupport::isPopupInputField(focusedElement))
</ins><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitblackberryWebKitSupportInputHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">     if (!frame || !frame-&gt;document())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Node* node = frame-&gt;document()-&gt;focusedNode();
</del><ins>+    Node* node = frame-&gt;document()-&gt;focusedElement();
</ins><span class="cx"> 
</span><span class="cx">     if (isActiveTextEdit() &amp;&amp; m_currentFocusElement == node) {
</span><span class="cx">         notifyClientOfKeyboardVisibilityChange(true);
</span></span></pre></div>
<a id="trunkSourceWebKitblackberryWebKitSupportSelectionHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx"> 
</span><span class="cx"> void SelectionHandler::setCaretPosition(const WebCore::IntPoint&amp; position)
</span><span class="cx"> {
</span><del>-    if (!m_webPage-&gt;m_inputHandler-&gt;isInputMode() || !m_webPage-&gt;focusedOrMainFrame()-&gt;document()-&gt;focusedNode())
</del><ins>+    if (!m_webPage-&gt;m_inputHandler-&gt;isInputMode() || !m_webPage-&gt;focusedOrMainFrame()-&gt;document()-&gt;focusedElement())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_caretActive = true;
</span><span class="lines">@@ -369,14 +369,14 @@
</span><span class="cx"> unsigned SelectionHandler::extendSelectionToFieldBoundary(bool isStartHandle, const WebCore::IntPoint&amp; selectionPoint, VisibleSelection&amp; newSelection)
</span><span class="cx"> {
</span><span class="cx">     Frame* focusedFrame = m_webPage-&gt;focusedOrMainFrame();
</span><del>-    if (!focusedFrame-&gt;document()-&gt;focusedNode() || !focusedFrame-&gt;document()-&gt;focusedNode()-&gt;renderer())
</del><ins>+    if (!focusedFrame-&gt;document()-&gt;focusedElement() || !focusedFrame-&gt;document()-&gt;focusedElement()-&gt;renderer())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     VisibleSelection activeSelection = focusedFrame-&gt;selection()-&gt;selection();
</span><span class="cx"> 
</span><span class="cx">     WebCore::IntRect caretRect = isStartHandle ? activeSelection.visibleStart().absoluteCaretBounds() : activeSelection.visibleEnd().absoluteCaretBounds();
</span><span class="cx"> 
</span><del>-    WebCore::IntRect nodeBoundingBox = focusedFrame-&gt;document()-&gt;focusedNode()-&gt;renderer()-&gt;absoluteBoundingBoxRect();
</del><ins>+    WebCore::IntRect nodeBoundingBox = focusedFrame-&gt;document()-&gt;focusedElement()-&gt;renderer()-&gt;absoluteBoundingBoxRect();
</ins><span class="cx">     nodeBoundingBox.inflate(-1);
</span><span class="cx"> 
</span><span class="cx">     // Start handle is outside of the field. Treat it as the changed handle and move
</span><span class="lines">@@ -414,7 +414,7 @@
</span><span class="cx">     ASSERT(m_webPage-&gt;m_inputHandler-&gt;isInputMode());
</span><span class="cx"> 
</span><span class="cx">     Frame* focusedFrame = m_webPage-&gt;focusedOrMainFrame();
</span><del>-    Node* focusedNode = focusedFrame-&gt;document()-&gt;focusedNode();
</del><ins>+    Node* focusedNode = focusedFrame-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     if (!focusedNode || !focusedNode-&gt;renderer())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1064,9 +1064,9 @@
</span><span class="cx">     WebCore::IntPoint clippedPoint = DOMSupport::convertPointToFrame(m_webPage-&gt;mainFrame(), frame, point, true /* clampToTargetFrame */);
</span><span class="cx"> 
</span><span class="cx">     if (m_webPage-&gt;m_inputHandler-&gt;isInputMode()
</span><del>-        &amp;&amp; frame-&gt;document()-&gt;focusedNode()
-        &amp;&amp; frame-&gt;document()-&gt;focusedNode()-&gt;renderer()) {
-            WebCore::IntRect boundingBox(frame-&gt;document()-&gt;focusedNode()-&gt;renderer()-&gt;absoluteBoundingBoxRect());
</del><ins>+        &amp;&amp; frame-&gt;document()-&gt;focusedElement()
+        &amp;&amp; frame-&gt;document()-&gt;focusedElement()-&gt;renderer()) {
+            WebCore::IntRect boundingBox(frame-&gt;document()-&gt;focusedElement()-&gt;renderer()-&gt;absoluteBoundingBoxRect());
</ins><span class="cx">             boundingBox.inflate(-1);
</span><span class="cx">             clippedPoint = WebCore::IntPoint(clamp(boundingBox.x(), clippedPoint.x(), boundingBox.maxX()), clamp(boundingBox.y(), clippedPoint.y(), boundingBox.maxY()));
</span><span class="cx">     }
</span><span class="lines">@@ -1108,7 +1108,7 @@
</span><span class="cx">     if (!m_webPage-&gt;m_inputHandler-&gt;isInputMode())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    Node* focusedNode = m_webPage-&gt;focusedOrMainFrame()-&gt;document()-&gt;focusedNode();
</del><ins>+    Node* focusedNode = m_webPage-&gt;focusedOrMainFrame()-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     if (!focusedNode || !focusedNode-&gt;isElementNode())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1166,7 +1166,7 @@
</span><span class="cx">     else if (!m_selectionActive)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (Node* focusedNode = frame-&gt;document()-&gt;focusedNode()) {
</del><ins>+    if (Node* focusedNode = frame-&gt;document()-&gt;focusedElement()) {
</ins><span class="cx">         if (focusedNode-&gt;hasTagName(HTMLNames::selectTag) || (focusedNode-&gt;isElementNode() &amp;&amp; DOMSupport::isPopupInputField(toElement(focusedNode)))) {
</span><span class="cx">             SelectionLog(Platform::LogLevelInfo, &quot;SelectionHandler::selectionPositionChanged selection is on a popup control, skipping rendering.&quot;);
</span><span class="cx">             return;
</span></span></pre></div>
<a id="trunkSourceWebKiteflChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/efl/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_focused_element_geometry_get):
+        * ewk/ewk_view.cpp:
+        (ewk_view_input_method_state_set):
+
</ins><span class="cx"> 2013-05-28  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] pc files should have harfbuzz dependency.
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_framecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -869,7 +869,7 @@
</span><span class="cx">     WebCore::Document* document = smartData-&gt;frame-&gt;document();
</span><span class="cx">     if (!document)
</span><span class="cx">         return false;
</span><del>-    WebCore::Node* focusedNode = document-&gt;focusedNode();
</del><ins>+    WebCore::Node* focusedNode = document-&gt;focusedElement();
</ins><span class="cx">     if (!focusedNode)
</span><span class="cx">         return false;
</span><span class="cx">     WebCore::IntRect nodeRect = focusedNode-&gt;pixelSnappedBoundingBox();
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_viewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -3061,11 +3061,11 @@
</span><span class="cx">     priv-&gt;imh = 0;
</span><span class="cx">     if (focusedFrame
</span><span class="cx">         &amp;&amp; focusedFrame-&gt;document()
</span><del>-        &amp;&amp; focusedFrame-&gt;document()-&gt;focusedNode()
-        &amp;&amp; focusedFrame-&gt;document()-&gt;focusedNode()-&gt;hasTagName(WebCore::HTMLNames::inputTag)) {
</del><ins>+        &amp;&amp; focusedFrame-&gt;document()-&gt;focusedElement()
+        &amp;&amp; focusedFrame-&gt;document()-&gt;focusedElement()-&gt;hasTagName(WebCore::HTMLNames::inputTag)) {
</ins><span class="cx">         WebCore::HTMLInputElement* inputElement;
</span><span class="cx"> 
</span><del>-        inputElement = static_cast&lt;WebCore::HTMLInputElement*&gt;(focusedFrame-&gt;document()-&gt;focusedNode());
</del><ins>+        inputElement = static_cast&lt;WebCore::HTMLInputElement*&gt;(focusedFrame-&gt;document()-&gt;focusedElement());
</ins><span class="cx">         if (inputElement) {
</span><span class="cx">             // for password fields, active == false
</span><span class="cx">             if (!active) {
</span></span></pre></div>
<a id="trunkSourceWebKitgtkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/gtk/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * webkit/webkitwebview.cpp:
+        (getFocusedNode):
+
</ins><span class="cx"> 2013-05-24  Christophe Dumez  &lt;ch.dumez@sisa.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove custom code for webkitAudioContext global constructor getter
</span></span></pre></div>
<a id="trunkSourceWebKitgtkwebkitwebkitwebviewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx"> static Node* getFocusedNode(Frame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (Document* doc = frame-&gt;document())
</span><del>-        return doc-&gt;focusedNode();
</del><ins>+        return doc-&gt;focusedElement();
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/mac/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView clearFocus]):
+        (-[WebHTMLView becomeFirstResponder]):
+
</ins><span class="cx"> 2013-05-25  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove Document::getFocusableNodes().
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -3144,7 +3144,7 @@
</span><span class="cx">     if (!document)
</span><span class="cx">         return;
</span><span class="cx">     
</span><del>-    document-&gt;setFocusedNode(0);
</del><ins>+    document-&gt;setFocusedElement(0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)isOpaque
</span><span class="lines">@@ -3817,7 +3817,7 @@
</span><span class="cx">         return YES;
</span><span class="cx"> 
</span><span class="cx">     if (Document* document = frame-&gt;document())
</span><del>-        document-&gt;setFocusedNode(0);
</del><ins>+        document-&gt;setFocusedElement(0);
</ins><span class="cx">     page-&gt;focusController()-&gt;setInitialFocus(direction == NSSelectingNext ? FocusDirectionForward : FocusDirectionBackward,
</span><span class="cx">                                              currentKeyboardEvent(frame).get());
</span><span class="cx">     return YES;
</span></span></pre></div>
<a id="trunkSourceWebKitqtApiqwebelementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/qt/Api/qwebelement.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/qt/Api/qwebelement.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/qt/Api/qwebelement.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -521,7 +521,7 @@
</span><span class="cx">     if (!m_element)
</span><span class="cx">         return false;
</span><span class="cx">     if (m_element-&gt;document())
</span><del>-        return m_element == m_element-&gt;document()-&gt;focusedNode();
</del><ins>+        return m_element == m_element-&gt;document()-&gt;focusedElement();
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -535,7 +535,7 @@
</span><span class="cx">     if (!m_element)
</span><span class="cx">         return;
</span><span class="cx">     if (m_element-&gt;document() &amp;&amp; m_element-&gt;isFocusable())
</span><del>-        m_element-&gt;document()-&gt;setFocusedNode(m_element);
</del><ins>+        m_element-&gt;document()-&gt;setFocusedElement(m_element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /*!
</span></span></pre></div>
<a id="trunkSourceWebKitqtChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/qt/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/qt/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/qt/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * Api/qwebelement.cpp:
+        (QWebElement::hasFocus):
+        (QWebElement::setFocus):
+        * WebCoreSupport/EditorClientQt.cpp:
+        (WebCore::EditorClientQt::setInputMethodState):
+        * WebCoreSupport/QWebPageAdapter.cpp:
+        (QWebPageAdapter::mousePressEvent):
+        (QWebPageAdapter::handleSoftwareInputPanel):
+        (QWebPageAdapter::inputMethodQuery):
+        (QWebPageAdapter::hasFocusedNode):
+
</ins><span class="cx"> 2013-05-27  Jocelyn Turcotte  &lt;jocelyn.turcotte@digia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Qt][Win] Input events aren't mapped properly with windowless plugins.
</span></span></pre></div>
<a id="trunkSourceWebKitqtWebCoreSupportEditorClientQtcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -618,9 +618,9 @@
</span><span class="cx"> 
</span><span class="cx">         HTMLInputElement* inputElement = 0;
</span><span class="cx">         Frame* frame = m_page-&gt;page-&gt;focusController()-&gt;focusedOrMainFrame();
</span><del>-        if (frame &amp;&amp; frame-&gt;document() &amp;&amp; frame-&gt;document()-&gt;focusedNode())
-            if (frame-&gt;document()-&gt;focusedNode()-&gt;hasTagName(HTMLNames::inputTag))
-                inputElement = static_cast&lt;HTMLInputElement*&gt;(frame-&gt;document()-&gt;focusedNode());
</del><ins>+        if (frame &amp;&amp; frame-&gt;document() &amp;&amp; frame-&gt;document()-&gt;focusedElement())
+            if (frame-&gt;document()-&gt;focusedElement()-&gt;hasTagName(HTMLNames::inputTag))
+                inputElement = static_cast&lt;HTMLInputElement*&gt;(frame-&gt;document()-&gt;focusedElement());
</ins><span class="cx"> 
</span><span class="cx">         if (inputElement) {
</span><span class="cx">             // Set input method hints for &quot;number&quot;, &quot;tel&quot;, &quot;email&quot;, &quot;url&quot; and &quot;password&quot; input elements.
</span></span></pre></div>
<a id="trunkSourceWebKitqtWebCoreSupportQWebPageAdaptercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -433,7 +433,7 @@
</span><span class="cx">     RefPtr&lt;WebCore::Node&gt; oldNode;
</span><span class="cx">     Frame* focusedFrame = page-&gt;focusController()-&gt;focusedFrame();
</span><span class="cx">     if (Document* focusedDocument = focusedFrame ? focusedFrame-&gt;document() : 0)
</span><del>-        oldNode = focusedDocument-&gt;focusedNode();
</del><ins>+        oldNode = focusedDocument-&gt;focusedElement();
</ins><span class="cx"> 
</span><span class="cx">     if (tripleClickTimer.isActive()
</span><span class="cx">         &amp;&amp; (ev-&gt;pos() - tripleClick).manhattanLength() &lt; qGuiApp-&gt;styleHints()-&gt;startDragDistance()) {
</span><span class="lines">@@ -451,7 +451,7 @@
</span><span class="cx">     RefPtr&lt;WebCore::Node&gt; newNode;
</span><span class="cx">     focusedFrame = page-&gt;focusController()-&gt;focusedFrame();
</span><span class="cx">     if (Document* focusedDocument = focusedFrame ? focusedFrame-&gt;document() : 0)
</span><del>-        newNode = focusedDocument-&gt;focusedNode();
</del><ins>+        newNode = focusedDocument-&gt;focusedElement();
</ins><span class="cx"> 
</span><span class="cx">     if (newNode &amp;&amp; oldNode != newNode)
</span><span class="cx">         clickCausedFocus = true;
</span><span class="lines">@@ -511,7 +511,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (client &amp;&amp; client-&gt;inputMethodEnabled()
</span><del>-        &amp;&amp; frame-&gt;document()-&gt;focusedNode()
</del><ins>+        &amp;&amp; frame-&gt;document()-&gt;focusedElement()
</ins><span class="cx">             &amp;&amp; button == Qt::LeftButton &amp;&amp; qGuiApp-&gt;property(&quot;autoSipEnabled&quot;).toBool()) {
</span><span class="cx">         if (!clickCausedFocus || requestSoftwareInputPanel()) {
</span><span class="cx">             HitTestResult result = frame-&gt;eventHandler()-&gt;hitTestResultAtPoint(frame-&gt;view()-&gt;windowToContents(pos));
</span><span class="lines">@@ -709,9 +709,9 @@
</span><span class="cx">     }
</span><span class="cx">     case Qt::ImMaximumTextLength: {
</span><span class="cx">         if (frame-&gt;selection()-&gt;isContentEditable()) {
</span><del>-            if (frame-&gt;document() &amp;&amp; frame-&gt;document()-&gt;focusedNode()) {
-                if (frame-&gt;document()-&gt;focusedNode()-&gt;hasTagName(HTMLNames::inputTag)) {
-                    HTMLInputElement* inputElement = static_cast&lt;HTMLInputElement*&gt;(frame-&gt;document()-&gt;focusedNode());
</del><ins>+            if (frame-&gt;document() &amp;&amp; frame-&gt;document()-&gt;focusedElement()) {
+                if (frame-&gt;document()-&gt;focusedElement()-&gt;hasTagName(HTMLNames::inputTag)) {
+                    HTMLInputElement* inputElement = static_cast&lt;HTMLInputElement*&gt;(frame-&gt;document()-&gt;focusedElement());
</ins><span class="cx">                     return QVariant(inputElement-&gt;maxLength());
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -1209,7 +1209,7 @@
</span><span class="cx">     Frame* frame = page-&gt;focusController()-&gt;focusedFrame();
</span><span class="cx">     if (frame) {
</span><span class="cx">         Document* document = frame-&gt;document();
</span><del>-        hasFocus = document &amp;&amp; document-&gt;focusedNode();
</del><ins>+        hasFocus = document &amp;&amp; document-&gt;focusedElement();
</ins><span class="cx">     }
</span><span class="cx">     return hasFocus;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/win/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * DOMCoreClasses.cpp:
+        (DOMElement::isFocused):
+        * WebView.cpp:
+        (WebView::setInitialFocus):
+
</ins><span class="cx"> 2013-05-27  Xueqing Huang  &lt;huangxueqing@baidu.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move Windows port off legacy clipboard.
</span></span></pre></div>
<a id="trunkSourceWebKitwinDOMCoreClassescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMCoreClasses.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMCoreClasses.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/win/DOMCoreClasses.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1216,7 +1216,7 @@
</span><span class="cx">     if (!m_element)
</span><span class="cx">         return E_FAIL;
</span><span class="cx"> 
</span><del>-    if (m_element-&gt;document()-&gt;focusedNode() == m_element)
</del><ins>+    if (m_element-&gt;document()-&gt;focusedElement() == m_element)
</ins><span class="cx">         *result = TRUE;
</span><span class="cx">     else
</span><span class="cx">         *result = FALSE;
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit/win/WebView.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -5283,7 +5283,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_page &amp;&amp; m_page-&gt;focusController()) {
</span><span class="cx">         Frame* frame = m_page-&gt;focusController()-&gt;focusedOrMainFrame();
</span><del>-        frame-&gt;document()-&gt;setFocusedNode(0);
</del><ins>+        frame-&gt;document()-&gt;setFocusedElement(0);
</ins><span class="cx">         m_page-&gt;focusController()-&gt;setInitialFocus(forward ? FocusDirectionForward : FocusDirectionBackward, 0);
</span><span class="cx">     }
</span><span class="cx">     return S_OK;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit2/ChangeLog        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Document::setFocusedNode() should be setFocusedElement().
+        &lt;http://webkit.org/b/116857&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::focusPluginElement):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::focusedPluginViewForFrame):
+        (WebKit::WebPage::setInitialFocus):
+
</ins><span class="cx"> 2013-05-28  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL][WK2] Clean up duplicated include files.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -1041,7 +1041,7 @@
</span><span class="cx">     if (Page* page = frame()-&gt;page())
</span><span class="cx">         page-&gt;focusController()-&gt;setFocusedElement(m_pluginElement.get(), frame());
</span><span class="cx">     else
</span><del>-       frame()-&gt;document()-&gt;setFocusedNode(m_pluginElement);
</del><ins>+        frame()-&gt;document()-&gt;setFocusedElement(m_pluginElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PluginView::pendingURLRequestsTimerFired()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (150795 => 150796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-05-28 10:43:51 UTC (rev 150795)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-05-28 12:46:31 UTC (rev 150796)
</span><span class="lines">@@ -744,7 +744,7 @@
</span><span class="cx"> 
</span><span class="cx">     PluginDocument* pluginDocument = static_cast&lt;PluginDocument*&gt;(frame-&gt;document());
</span><span class="cx"> 
</span><del>-    if (pluginDocument-&gt;focusedNode() != pluginDocument-&gt;pluginElement())
</del><ins>+    if (pluginDocument-&gt;focusedElement() != pluginDocument-&gt;pluginElement())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     PluginView* pluginView = static_cast&lt;PluginView*&gt;(pluginDocument-&gt;pluginWidget());
</span><span class="lines">@@ -2048,7 +2048,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Frame* frame = m_page-&gt;focusController()-&gt;focusedOrMainFrame();
</span><del>-    frame-&gt;document()-&gt;setFocusedNode(0);
</del><ins>+    frame-&gt;document()-&gt;setFocusedElement(0);
</ins><span class="cx"> 
</span><span class="cx">     if (isKeyboardEventValid &amp;&amp; event.type() == WebEvent::KeyDown) {
</span><span class="cx">         PlatformKeyboardEvent platformEvent(platform(event));
</span></span></pre>
</div>
</div>

</body>
</html>