Document::setFocusedNode() should be setFocusedElement().
<http://webkit.org/b/116857>

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Unskip now passing tests.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r149292): broke scrolling in Qt WK2 desktop mode
https://bugs.webkit.org/show_bug.cgi?id=116597

ScrollingCoordinatorCoordinatedGraphics is tailored specifically for
fixedLayout mode. When fixedLayout is not set, it should be turned off.

Patch by Noam Rosenthal <noam@webkit.org> on 2013-05-28
Reviewed by Allan Sandfeld Jensen.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove CachedResourceRequest::initiatorElement
https://bugs.webkit.org/show_bug.cgi?id=116862

Reviewed by Andreas Kling.

The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.

* loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
* loader/cache/CachedResourceRequest.h:
(CachedResourceRequest): Remove the initiatorElement method declaration.


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