Remove unused ChromeClient::formStateDidChange().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Feb 2014 22:20:07 +0000 (22:20 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Feb 2014 22:20:07 +0000 (22:20 +0000)
<https://webkit.org/b/128469>

Nobody listens for this callback anymore so remove it and stop
spamming no-op virtual dispatches in forms code.

Reviewed by Anders Carlsson.

* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLFormControlElementWithState.cpp:
* html/HTMLFormControlElementWithState.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::setValue):
(WebCore::HTMLInputElement::setValueFromRenderer):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::selectOption):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateValue):
(WebCore::HTMLTextAreaElement::setValueCommon):
* loader/EmptyClients.h:
* page/ChromeClient.h:

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

19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/HTMLFormControlElementWithState.cpp
Source/WebCore/html/HTMLFormControlElementWithState.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ChromeClient.h
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

index 8dda90817b6f253535a15c4503b07728c5736359..1ccb857a78e006a87dd9c52e8298ab475099aaa6 100644 (file)
@@ -1,3 +1,30 @@
+2014-02-08  Andreas Kling  <akling@apple.com>
+
+        Remove unused ChromeClient::formStateDidChange().
+        <https://webkit.org/b/128469>
+
+        Nobody listens for this callback anymore so remove it and stop
+        spamming no-op virtual dispatches in forms code.
+
+        Reviewed by Anders Carlsson.
+
+        * html/FileInputType.cpp:
+        (WebCore::FileInputType::setFiles):
+        * html/HTMLFormControlElementWithState.cpp:
+        * html/HTMLFormControlElementWithState.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::updateType):
+        (WebCore::HTMLInputElement::setValue):
+        (WebCore::HTMLInputElement::setValueFromRenderer):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::updateListBoxSelection):
+        (WebCore::HTMLSelectElement::selectOption):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::updateValue):
+        (WebCore::HTMLTextAreaElement::setValueCommon):
+        * loader/EmptyClients.h:
+        * page/ChromeClient.h:
+
 2014-02-08  Chris J. Shull  <chrisjshull@gmail.com>
 
         Web Inspector: Find evaluates attributes in a case sensitive manner
index e142dc37723c34fb25200781ef604c39cd48e0d3..e866820eb7aefa26cf3a898256feb072ec8cf3fc 100644 (file)
@@ -349,7 +349,6 @@ void FileInputType::setFiles(PassRefPtr<FileList> files)
     m_fileList = files;
 
     input->setFormControlValueMatchesRenderer(true);
-    input->notifyFormStateChanged();
     input->setNeedsValidityCheck();
 
     Vector<String> paths;
index d16577f0a0142db5751beaed15f074447afbf92d..57b238ec58a45c8fe3d5cd70cb959a8c47edb274 100644 (file)
@@ -64,16 +64,6 @@ bool HTMLFormControlElementWithState::shouldAutocomplete() const
     return form()->shouldAutocomplete();
 }
 
-void HTMLFormControlElementWithState::notifyFormStateChanged()
-{
-    Frame* frame = document().frame();
-    if (!frame)
-        return;
-
-    if (Page* page = frame->page())
-        page->chrome().client().formStateDidChange(this);
-}
-
 bool HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState() const
 {
     // We don't save/restore control state in a form with autocomplete=off.
index 99f04e053b12fd3f2543604c011ca540dafb0d84..323caddcb0302da2b7a4b53ed89f272e06728745 100644 (file)
@@ -40,7 +40,6 @@ public:
     virtual FormControlState saveFormControlState() const;
     // The specified FormControlState must have at least one string value.
     virtual void restoreFormControlState(const FormControlState&) { }
-    void notifyFormStateChanged();
 
 protected:
     HTMLFormControlElementWithState(const QualifiedName& tagName, Document&, HTMLFormElement*);
index e352d2542ee53b015fb79b3dfd4252713006c93b..2466897ce3fa882a116ebf0220aabc8723868dee 100644 (file)
@@ -533,7 +533,6 @@ void HTMLInputElement::updateType()
     addToRadioButtonGroup();
 
     setNeedsValidityCheck();
-    notifyFormStateChanged();
 }
 
 void HTMLInputElement::subtreeHasChanged()
@@ -1024,8 +1023,6 @@ void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior even
 
     if (!valueChanged)
         return;
-
-    notifyFormStateChanged();
 }
 
 void HTMLInputElement::setValueInternal(const String& sanitizedValue, TextFieldEventBehavior eventBehavior)
@@ -1080,7 +1077,6 @@ void HTMLInputElement::setValueFromRenderer(const String& value)
     // Input event is fired by the Node::defaultEventHandler for editable controls.
     if (!isTextField())
         dispatchInputEvent();
-    notifyFormStateChanged();
 
     setNeedsValidityCheck();
 
index db5f53e6757a1e93b7eb6a40af36f184f967d4ca..f9bb5e7ece9d48f1a1a80dc1cdc93bedba5c028c 100644 (file)
@@ -661,7 +661,6 @@ void HTMLSelectElement::updateListBoxSelection(bool deselectOtherOptions)
 
     scrollToSelection();
     setNeedsValidityCheck();
-    notifyFormStateChanged();
 }
 
 void HTMLSelectElement::listBoxOnChange()
@@ -909,7 +908,6 @@ void HTMLSelectElement::selectOption(int optionIndex, SelectOptionFlags flags)
     }
 
     setNeedsValidityCheck();
-    notifyFormStateChanged();
 }
 
 int HTMLSelectElement::optionToListIndex(int optionIndex) const
index b465d101aecb3ef85b635f906c27b1d5037eb300..ec951ac62183cea8481c53bf6755c5465e99bd9a 100644 (file)
@@ -341,7 +341,6 @@ void HTMLTextAreaElement::updateValue() const
     ASSERT(renderer());
     m_value = innerTextValue();
     const_cast<HTMLTextAreaElement*>(this)->setFormControlValueMatchesRenderer(true);
-    const_cast<HTMLTextAreaElement*>(this)->notifyFormStateChanged();
     m_isDirty = true;
     m_wasModifiedByUser = true;
     const_cast<HTMLTextAreaElement*>(this)->updatePlaceholderVisibility(false);
@@ -394,7 +393,6 @@ void HTMLTextAreaElement::setValueCommon(const String& newValue)
         setSelectionRange(endOfString, endOfString);
     }
 
-    notifyFormStateChanged();
     setTextAsOfLastFormControlChangeEvent(normalizedValue);
 }
 
index 6c559cb1e0c778b3713c2d7671986e649dee718f..19cefa8d3a3eabdf7108f961b7624dc6dd8b5179 100644 (file)
@@ -167,8 +167,6 @@ public:
     virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) override;
     virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*) override { }
 
-    virtual void formStateDidChange(const Node*) override { }
-
     virtual void elementDidFocus(const Node*) override { }
     virtual void elementDidBlur(const Node*) override { }
 
index e30dc005685536b4592126a61dde0744e6d55eeb..14cfcb3042293d2e88f67073e2f7adb5bf57e55e 100644 (file)
@@ -268,10 +268,6 @@ public:
     virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) = 0;
     // Asynchronous request to load an icon for specified filenames.
     virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*) = 0;
-
-    // Notification that the given form element has changed. This function
-    // will be called frequently, so handling should be very fast.
-    virtual void formStateDidChange(const Node*) = 0;
         
     virtual void elementDidFocus(const Node*) { };
     virtual void elementDidBlur(const Node*) { };
index 9a885be3640557a2d7127c6b3531adf1ffdb9642..937505f54b3ba5235511c6711dfff24f395ac330 100644 (file)
@@ -497,11 +497,6 @@ void ChromeClientEfl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFile
         chooser->chooseFile(filenames[0]);
 }
 
-void ChromeClientEfl::formStateDidChange(const Node*)
-{
-    notImplemented();
-}
-
 void ChromeClientEfl::setCursor(const Cursor& cursor)
 {
     ewk_view_cursor_set(m_view, cursor);
index 0c092e781ce024cc3629079c6c1e3fa7b541a984..110642de5d6a0ac402e52a3cbcfce61faaba1d05 100644 (file)
@@ -147,7 +147,6 @@ public:
 
     virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
     virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*);
-    virtual void formStateDidChange(const Node*);
 
     virtual void setCursor(const Cursor&);
     virtual void setCursorHiddenUntilMouseMoves(bool);
index 1de7f2f7089e29065ffccdc3437a1f4190552ed2..cb0382e93da7acf9e36d7b7a673f5cffd3a1b68e 100644 (file)
@@ -122,8 +122,6 @@ namespace WebKit {
         virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
         virtual void loadIconForFiles(const Vector<WTF::String>&, FileIconLoader*);
 
-        virtual void formStateDidChange(const Node*) { }
-
         virtual void setCursor(const Cursor&);
         virtual void setCursorHiddenUntilMouseMoves(bool);
 
index b1c9a7fde5f0293a37f75907b941a664328c4f78..a5c357d6bd099c51b6e8080c0c9f4222f6b9ab3c 100644 (file)
@@ -62,8 +62,6 @@ public:
     virtual void suppressFormNotifications() override;
     virtual void restoreFormNotifications() override;
     
-    virtual void formStateDidChange(const WebCore::Node*) override { }
-
     virtual void elementDidFocus(const WebCore::Node*) override;
     virtual void elementDidBlur(const WebCore::Node*) override;
 
index 0d7f98cc88c1d5a4a2eb6900d9cb2045e0d3ba71..83ce0eb39e68889741f90248cb21da2a52f85615 100644 (file)
@@ -153,8 +153,6 @@ public:
     virtual bool shouldReplaceWithGeneratedFileForUpload(const WTF::String& path, WTF::String &generatedFilename) override;
     virtual WTF::String generateReplacementFile(const WTF::String& path) override;
 
-    virtual void formStateDidChange(const WebCore::Node*) override { }
-
     virtual void elementDidFocus(const WebCore::Node*) override;
     virtual void elementDidBlur(const WebCore::Node*) override;
 
index e65cd9445bcbb81bde9128c45c961239b7d77e8d..e149e7bcbe3ecf9ee4554fbe40a886e9aeeb2a86 100644 (file)
@@ -128,8 +128,6 @@ public:
     virtual void setCursorHiddenUntilMouseMoves(bool);
     virtual void setLastSetCursorToCurrentCursor();
 
-    virtual void formStateDidChange(const WebCore::Node*) { }
-
     // Pass 0 as the GraphicsLayer to detatch the root layer.
     virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*);
     // Sets a flag to specify that the next time content is drawn to the window,
index 0ea1594274ac6b47bd5e5123e49b057509b8758e..f99480ca2af786db20e20d04a38858889cdf14d9 100644 (file)
@@ -367,11 +367,6 @@ void ChromeClientWinCE::AXFinishFrameLoad()
     notImplemented();
 }
 
-void ChromeClientWinCE::formStateDidChange(const Node*)
-{
-    notImplemented();
-}
-
 bool ChromeClientWinCE::selectItemWritingDirectionIsNatural()
 {
     return false;
index 7598db246883e85f624d3bb976a8ad7ec428749e..6663c2cbf25ac0b752f552a82f5da62559b74d9b 100644 (file)
@@ -133,10 +133,6 @@ public:
     // Asynchronous request to load an icon for specified filenames.
     virtual void loadIconForFiles(const Vector<WTF::String>&, WebCore::FileIconLoader*) override;
 
-    // Notification that the given form element has changed. This function
-    // will be called frequently, so handling should be very fast.
-    virtual void formStateDidChange(const WebCore::Node*) override;
-
     // Pass 0 as the GraphicsLayer to detatch the root layer.
     virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
     // Sets a flag to specify that the next time content is drawn to the window,
index adcbf9e7da516f2117efb8e5705cb1b6c65d476f..37b3c5dec44bb59cee09bc8f02dc8ea29ec86ece 100644 (file)
@@ -723,11 +723,6 @@ void WebChromeClient::scheduleAnimation()
 }
 #endif
 
-void WebChromeClient::formStateDidChange(const Node*)
-{
-    notImplemented();
-}
-
 void WebChromeClient::didAssociateFormControls(const Vector<RefPtr<WebCore::Element>>& elements)
 {
     return m_page->injectedBundleFormClient().didAssociateFormControls(m_page, elements);
index 27d784bf10e7714f8dfc4b98d46875dd226714e1..24287a12473152e848674668133a62273f6226a7 100644 (file)
@@ -188,10 +188,6 @@ private:
     virtual void scheduleAnimation() override;
 #endif
 
-    // Notification that the given form element has changed. This function
-    // will be called frequently, so handling should be very fast.
-    virtual void formStateDidChange(const WebCore::Node*) override;
-
     virtual void didAssociateFormControls(const Vector<RefPtr<WebCore::Element>>&) override;
     virtual bool shouldNotifyOnFormChanges() override;