ChromeClient::focusedNodeChanged() should be focusedElementChanged().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2013 23:57:40 +0000 (23:57 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2013 23:57:40 +0000 (23:57 +0000)
<http://webkit.org/b/119110>

Reviewed by Anders Carlsson.

Source/WebCore:

Because only Elements can be focused.

* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::focusedElementChanged):
* page/Chrome.cpp:
(WebCore::Chrome::focusedElementChanged):
* page/Chrome.h:
* page/ChromeClient.h:

Source/WebKit/blackberry:

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::focusedElementChanged):
* WebCoreSupport/ChromeClientBlackBerry.h:

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::focusedElementChanged):
* WebCoreSupport/ChromeClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::focusedElementChanged):
* WebCoreSupport/ChromeClientGtk.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::focusedElementChanged):

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::focusedElementChanged):
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::focusedElementChanged):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.cpp:
(WebKit::ChromeClientWinCE::focusedElementChanged):
* WebCoreSupport/ChromeClientWinCE.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

30 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/Chrome.h
Source/WebCore/page/ChromeClient.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

index 9ce6ff1..3890ab4 100644 (file)
@@ -1,3 +1,21 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        Because only Elements can be focused.
+
+        * dom/Document.cpp:
+        (WebCore::Document::setFocusedElement):
+        * loader/EmptyClients.h:
+        (WebCore::EmptyChromeClient::focusedElementChanged):
+        * page/Chrome.cpp:
+        (WebCore::Chrome::focusedElementChanged):
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+
 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
 
         [WK2][Soup] Add private browsing support
index 350ac2e..a15b681 100644 (file)
@@ -3407,7 +3407,7 @@ bool Document::setFocusedElement(PassRefPtr<Element> prpNewFocusedElement, Focus
     }
 
     if (!focusChangeBlocked)
-        page()->chrome().focusedNodeChanged(m_focusedElement.get());
+        page()->chrome().focusedElementChanged(m_focusedElement.get());
 
 SetFocusedNodeDone:
     updateStyleIfNeeded();
index 64a24b3..17427d3 100644 (file)
@@ -77,7 +77,7 @@ public:
     virtual bool canTakeFocus(FocusDirection) { return false; }
     virtual void takeFocus(FocusDirection) { }
 
-    virtual void focusedNodeChanged(Node*) { }
+    virtual void focusedElementChanged(Element*) { }
     virtual void focusedFrameChanged(Frame*) { }
 
     virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) { return 0; }
index 0deaefd..bfd1ced 100644 (file)
@@ -178,9 +178,9 @@ void Chrome::takeFocus(FocusDirection direction) const
     m_client->takeFocus(direction);
 }
 
-void Chrome::focusedNodeChanged(Node* node) const
+void Chrome::focusedElementChanged(Element* element) const
 {
-    m_client->focusedNodeChanged(node);
+    m_client->focusedElementChanged(element);
 }
 
 void Chrome::focusedFrameChanged(Frame* frame) const
index f3de5ba..173f987 100644 (file)
@@ -44,12 +44,12 @@ class DateTimeChooserClient;
 class FileChooser;
 class FileIconLoader;
 class FloatRect;
+class Element;
 class Frame;
 class Geolocation;
 class HitTestResult;
 class IntRect;
 class NavigationAction;
-class Node;
 class Page;
 class PopupMenu;
 class PopupMenuClient;
@@ -107,7 +107,7 @@ public:
     bool canTakeFocus(FocusDirection) const;
     void takeFocus(FocusDirection) const;
 
-    void focusedNodeChanged(Node*) const;
+    void focusedElementChanged(Element*) const;
     void focusedFrameChanged(Frame*) const;
 
     Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) const;
index 6fce249..b5f73a6 100644 (file)
@@ -93,7 +93,7 @@ public:
     virtual bool canTakeFocus(FocusDirection) = 0;
     virtual void takeFocus(FocusDirection) = 0;
 
-    virtual void focusedNodeChanged(Node*) = 0;
+    virtual void focusedElementChanged(Element*) = 0;
     virtual void focusedFrameChanged(Frame*) = 0;
 
     // The Frame pointer provides the ChromeClient with context about which
index 64d236f..835cb1d 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore::ChromeClientBlackBerry::focusedElementChanged):
+        * WebCoreSupport/ChromeClientBlackBerry.h:
+
 2013-07-17  Kangil Han  <kangil.han@samsung.com>
 
         Use toHTMLMediaElement
index 1de9127..bfc13d3 100644 (file)
@@ -202,7 +202,7 @@ void ChromeClientBlackBerry::takeFocus(FocusDirection)
     notImplemented();
 }
 
-void ChromeClientBlackBerry::focusedNodeChanged(Node*)
+void ChromeClientBlackBerry::focusedElementChanged(Element*)
 {
     m_webPagePrivate->m_inputHandler->focusedNodeChanged();
 }
index b39e901..af62db4 100644 (file)
@@ -42,7 +42,7 @@ public:
     virtual void unfocus();
     virtual bool canTakeFocus(FocusDirection);
     virtual void takeFocus(FocusDirection);
-    virtual void focusedNodeChanged(Node*);
+    virtual void focusedElementChanged(Element*);
     virtual void focusedFrameChanged(Frame*);
     virtual bool shouldForceDocumentStyleSelectorUpdate();
     virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
index 2488180..7e69268 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore::ChromeClientEfl::focusedElementChanged):
+        * WebCoreSupport/ChromeClientEfl.h:
+
 2013-07-15  Kwang Yul Seo  <skyul@company100.net>
 
         NetworkStorageSession::createDefaultSession is only implemented by Soup
index af61167..d536387 100644 (file)
@@ -107,7 +107,7 @@ void ChromeClientEfl::chromeDestroyed()
     delete this;
 }
 
-void ChromeClientEfl::focusedNodeChanged(Node*)
+void ChromeClientEfl::focusedElementChanged(Element*)
 {
     notImplemented();
 }
index 257a987..6edbe37 100644 (file)
@@ -56,7 +56,7 @@ public:
     virtual bool canTakeFocus(FocusDirection);
     virtual void takeFocus(FocusDirection);
 
-    virtual void focusedNodeChanged(Node*);
+    virtual void focusedElementChanged(Element*);
     virtual void focusedFrameChanged(Frame*);
 
     virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
index d991525..3046637 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::focusedElementChanged):
+        * WebCoreSupport/ChromeClientGtk.h:
+
 2013-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] GtkAdjustmentWatcher idle source not correctly handled
index 90e7636..17d9ae2 100644 (file)
@@ -343,7 +343,7 @@ void ChromeClient::takeFocus(FocusDirection)
     unfocus();
 }
 
-void ChromeClient::focusedNodeChanged(Node*)
+void ChromeClient::focusedElementChanged(Element*)
 {
 }
 
index 38fc146..d1b0a59 100644 (file)
@@ -58,7 +58,7 @@ namespace WebKit {
         virtual bool canTakeFocus(FocusDirection);
         virtual void takeFocus(FocusDirection);
 
-        virtual void focusedNodeChanged(Node*);
+        virtual void focusedElementChanged(Element*);
         virtual void focusedFrameChanged(Frame*);
 
         virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
index 033861b..c7c2c59 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::focusedElementChanged):
+
 2013-05-05  Geoffrey Garen  <ggaren@apple.com>
 
         Rolled back in r149527 with crash fixed.
index c32b3f6..8ef8c23 100644 (file)
@@ -50,7 +50,7 @@ public:
     virtual bool canTakeFocus(WebCore::FocusDirection) OVERRIDE;
     virtual void takeFocus(WebCore::FocusDirection) OVERRIDE;
 
-    virtual void focusedNodeChanged(WebCore::Node*) OVERRIDE;
+    virtual void focusedElementChanged(WebCore::Element*) OVERRIDE;
     virtual void focusedFrameChanged(WebCore::Frame*) OVERRIDE;
 
     virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&) OVERRIDE;
index 3f0b053..7a9c865 100644 (file)
@@ -196,14 +196,14 @@ void WebChromeClient::takeFocus(FocusDirection direction)
     }
 }
 
-void WebChromeClient::focusedNodeChanged(Node* node)
+void WebChromeClient::focusedElementChanged(Element* element)
 {
-    if (!node)
+    if (!element)
         return;
-    if (!isHTMLInputElement(node))
+    if (!isHTMLInputElement(element))
         return;
 
-    HTMLInputElement* inputElement = toHTMLInputElement(node);
+    HTMLInputElement* inputElement = toHTMLInputElement(element);
     if (!inputElement->isText())
         return;
 
index cfb6ad3..8a912f7 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::focusedElementChanged):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2013-07-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         Remove deprecated and unused compositing settings
index aba037c..1aeae89 100644 (file)
@@ -213,7 +213,7 @@ void ChromeClientQt::takeFocus(FocusDirection)
 }
 
 
-void ChromeClientQt::focusedNodeChanged(Node*)
+void ChromeClientQt::focusedElementChanged(Element*)
 {
 }
 
index 8f2db26..9d5baac 100644 (file)
@@ -77,7 +77,7 @@ public:
     virtual bool canTakeFocus(FocusDirection);
     virtual void takeFocus(FocusDirection);
 
-    virtual void focusedNodeChanged(Node*);
+    virtual void focusedElementChanged(Element*);
     virtual void focusedFrameChanged(Frame*);
 
     virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
index d46a04b..068e0bc 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::focusedElementChanged):
+        * WebCoreSupport/WebChromeClient.h:
+
 2013-07-23  peavo@outlook.com  <peavo@outlook.com>
 
         [Win] WebView didReceiveIcon delegate call doesn't have the icon in it
index 10445ab..52c91e4 100644 (file)
@@ -163,7 +163,7 @@ void WebChromeClient::takeFocus(FocusDirection direction)
     }
 }
 
-void WebChromeClient::focusedNodeChanged(Node*)
+void WebChromeClient::focusedElementChanged(Element*)
 {
 }
 
index 40cec28..75018e8 100644 (file)
@@ -54,7 +54,7 @@ public:
     virtual bool canTakeFocus(WebCore::FocusDirection);
     virtual void takeFocus(WebCore::FocusDirection);
 
-    virtual void focusedNodeChanged(WebCore::Node*);
+    virtual void focusedElementChanged(WebCore::Element*);
     virtual void focusedFrameChanged(WebCore::Frame*);
 
     virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
index a2e932b..5031f72 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebCoreSupport/ChromeClientWinCE.cpp:
+        (WebKit::ChromeClientWinCE::focusedElementChanged):
+        * WebCoreSupport/ChromeClientWinCE.h:
+
 2013-06-26  Patrick Gansterer  <paroga@webkit.org>
 
         Unreviewed WinCE build fix after r152065.
index 47b2ae0..cd84879 100644 (file)
@@ -165,7 +165,7 @@ void ChromeClientWinCE::takeFocus(FocusDirection)
     unfocus();
 }
 
-void ChromeClientWinCE::focusedNodeChanged(Node*)
+void ChromeClientWinCE::focusedElementChanged(Element*)
 {
     notImplemented();
 }
index 01fd598..3c17421 100644 (file)
@@ -48,7 +48,7 @@ public:
     virtual bool canTakeFocus(WebCore::FocusDirection);
     virtual void takeFocus(WebCore::FocusDirection);
 
-    virtual void focusedNodeChanged(WebCore::Node*);
+    virtual void focusedElementChanged(WebCore::Element*);
     virtual void focusedFrameChanged(WebCore::Frame*);
 
     // The Frame pointer provides the ChromeClient with context about which
index 59aaef1..9dbd7c5 100644 (file)
@@ -1,3 +1,14 @@
+2013-07-25  Andreas Kling  <akling@apple.com>
+
+        ChromeClient::focusedNodeChanged() should be focusedElementChanged().
+        <http://webkit.org/b/119110>
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::focusedElementChanged):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+
 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
 
         [WK2][Soup] Add private browsing support
index ce16006..7e9fc91 100644 (file)
@@ -160,18 +160,18 @@ void WebChromeClient::takeFocus(FocusDirection direction)
     m_page->send(Messages::WebPageProxy::TakeFocus(direction));
 }
 
-void WebChromeClient::focusedNodeChanged(Node* node)
+void WebChromeClient::focusedElementChanged(Element* element)
 {
-    if (!node)
+    if (!element)
         return;
-    if (!isHTMLInputElement(node))
+    if (!isHTMLInputElement(element))
         return;
 
-    HTMLInputElement* inputElement = toHTMLInputElement(node);
+    HTMLInputElement* inputElement = toHTMLInputElement(element);
     if (!inputElement->isText())
         return;
 
-    WebFrameLoaderClient* webFrameLoaderClient = toWebFrameLoaderClient(node->document()->frame()->loader()->client());
+    WebFrameLoaderClient* webFrameLoaderClient = toWebFrameLoaderClient(element->document()->frame()->loader()->client());
     WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0;
     ASSERT(webFrame);
     m_page->injectedBundleFormClient().didFocusTextField(m_page, inputElement, webFrame);
index 4f28bb3..dfc24de 100644 (file)
@@ -63,7 +63,7 @@ private:
     virtual bool canTakeFocus(WebCore::FocusDirection) OVERRIDE;
     virtual void takeFocus(WebCore::FocusDirection) OVERRIDE;
 
-    virtual void focusedNodeChanged(WebCore::Node*) OVERRIDE;
+    virtual void focusedElementChanged(WebCore::Element*) OVERRIDE;
     virtual void focusedFrameChanged(WebCore::Frame*) OVERRIDE;
 
     // The Frame pointer provides the ChromeClient with context about which