Fix two bad function names of HTMLFormControlElement
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Nov 2014 04:30:08 +0000 (04:30 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Nov 2014 04:30:08 +0000 (04:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138790

Reviewed by Andreas Kling.

Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769

* dom/CheckedRadioButtons.cpp:
(WebCore::RadioButtonGroup::add):
(WebCore::RadioButtonGroup::updateCheckedState):
(WebCore::RadioButtonGroup::requiredAttributeChanged):
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::updateValidityForAllButtons):
(WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted.
* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::computeWillValidate):
(WebCore::HTMLButtonElement::recalcWillValidate): Deleted.
* html/HTMLButtonElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::requiredAttributeChanged):
(WebCore::HTMLFormControlElement::computeWillValidate):
(WebCore::HTMLFormControlElement::willValidate):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::isValidFormControlElement):
(WebCore::HTMLFormControlElement::updateValidity):
(WebCore::HTMLFormControlElement::setCustomValidity):
(WebCore::HTMLFormControlElement::recalcWillValidate): Deleted.
(WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted.
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setValueInternal):
(WebCore::HTMLInputElement::setValueFromRenderer):
(WebCore::HTMLInputElement::computeWillValidate):
(WebCore::HTMLInputElement::parseMaxLengthAttribute):
(WebCore::HTMLInputElement::recalcWillValidate): Deleted.
* html/HTMLInputElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLOutputElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::deselectItems):
(WebCore::HTMLSelectElement::optionSelectedByUser):
(WebCore::HTMLSelectElement::listBoxSelectItem):
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::childrenChanged):
(WebCore::HTMLSelectElement::optionElementChildrenChanged):
(WebCore::HTMLSelectElement::setLength):
(WebCore::HTMLSelectElement::selectAll):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
(WebCore::HTMLSelectElement::reset):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
(WebCore::HTMLTextAreaElement::setValue):
(WebCore::HTMLTextAreaElement::setNonDirtyValue):

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

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/CheckedRadioButtons.cpp
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/HTMLButtonElement.cpp
Source/WebCore/html/HTMLButtonElement.h
Source/WebCore/html/HTMLFieldSetElement.h
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLKeygenElement.h
Source/WebCore/html/HTMLOutputElement.h
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp

index d3fac57..a192f25 100644 (file)
@@ -1,3 +1,70 @@
+2014-11-17  Benjamin Poulain  <benjamin@webkit.org>
+
+        Fix two bad function names of HTMLFormControlElement
+        https://bugs.webkit.org/show_bug.cgi?id=138790
+
+        Reviewed by Andreas Kling.
+
+        Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769
+
+        * dom/CheckedRadioButtons.cpp:
+        (WebCore::RadioButtonGroup::add):
+        (WebCore::RadioButtonGroup::updateCheckedState):
+        (WebCore::RadioButtonGroup::requiredAttributeChanged):
+        (WebCore::RadioButtonGroup::remove):
+        (WebCore::RadioButtonGroup::updateValidityForAllButtons):
+        (WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted.
+        * html/FileInputType.cpp:
+        (WebCore::FileInputType::setFiles):
+        * html/HTMLButtonElement.cpp:
+        (WebCore::HTMLButtonElement::computeWillValidate):
+        (WebCore::HTMLButtonElement::recalcWillValidate): Deleted.
+        * html/HTMLButtonElement.h:
+        * html/HTMLFieldSetElement.h:
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::requiredAttributeChanged):
+        (WebCore::HTMLFormControlElement::computeWillValidate):
+        (WebCore::HTMLFormControlElement::willValidate):
+        (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
+        (WebCore::HTMLFormControlElement::isValidFormControlElement):
+        (WebCore::HTMLFormControlElement::updateValidity):
+        (WebCore::HTMLFormControlElement::setCustomValidity):
+        (WebCore::HTMLFormControlElement::recalcWillValidate): Deleted.
+        (WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted.
+        * html/HTMLFormControlElement.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
+        (WebCore::HTMLInputElement::parseAttribute):
+        (WebCore::HTMLInputElement::setChecked):
+        (WebCore::HTMLInputElement::setValueInternal):
+        (WebCore::HTMLInputElement::setValueFromRenderer):
+        (WebCore::HTMLInputElement::computeWillValidate):
+        (WebCore::HTMLInputElement::parseMaxLengthAttribute):
+        (WebCore::HTMLInputElement::recalcWillValidate): Deleted.
+        * html/HTMLInputElement.h:
+        * html/HTMLKeygenElement.h:
+        * html/HTMLOutputElement.h:
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::deselectItems):
+        (WebCore::HTMLSelectElement::optionSelectedByUser):
+        (WebCore::HTMLSelectElement::listBoxSelectItem):
+        (WebCore::HTMLSelectElement::add):
+        (WebCore::HTMLSelectElement::parseAttribute):
+        (WebCore::HTMLSelectElement::childrenChanged):
+        (WebCore::HTMLSelectElement::optionElementChildrenChanged):
+        (WebCore::HTMLSelectElement::setLength):
+        (WebCore::HTMLSelectElement::selectAll):
+        (WebCore::HTMLSelectElement::updateListBoxSelection):
+        (WebCore::HTMLSelectElement::selectOption):
+        (WebCore::HTMLSelectElement::restoreFormControlState):
+        (WebCore::HTMLSelectElement::parseMultipleAttribute):
+        (WebCore::HTMLSelectElement::reset):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::parseAttribute):
+        (WebCore::HTMLTextAreaElement::subtreeHasChanged):
+        (WebCore::HTMLTextAreaElement::setValue):
+        (WebCore::HTMLTextAreaElement::setNonDirtyValue):
+
 2014-11-17  Sukolsak Sakshuwong  <sukolsak@gmail.com>
 
         Add parsing for :role()
index e481c7d..df63f20 100644 (file)
@@ -40,7 +40,7 @@ public:
     bool contains(HTMLInputElement*) const;
 
 private:
-    void setNeedsValidityCheckForAllButtons();
+    void updateValidityForAllButtons();
     bool isValid() const;
     void setCheckedButton(HTMLInputElement*);
 
@@ -83,11 +83,11 @@ void RadioButtonGroup::add(HTMLInputElement* button)
 
     bool groupIsValid = isValid();
     if (groupWasValid != groupIsValid)
-        setNeedsValidityCheckForAllButtons();
+        updateValidityForAllButtons();
     else if (!groupIsValid) {
         // A radio button not in a group is always valid. We need to make it
         // invalid only if the group is invalid.
-        button->setNeedsValidityCheck();
+        button->updateValidity();
     }
 }
 
@@ -103,7 +103,7 @@ void RadioButtonGroup::updateCheckedState(HTMLInputElement* button)
             m_checkedButton = 0;
     }
     if (wasValid != isValid())
-        setNeedsValidityCheckForAllButtons();
+        updateValidityForAllButtons();
 }
 
 void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button)
@@ -118,7 +118,7 @@ void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button)
         --m_requiredCount;
     }
     if (wasValid != isValid())
-        setNeedsValidityCheckForAllButtons();
+        updateValidityForAllButtons();
 }
 
 void RadioButtonGroup::remove(HTMLInputElement* button)
@@ -140,22 +140,22 @@ void RadioButtonGroup::remove(HTMLInputElement* button)
         ASSERT(!m_requiredCount);
         ASSERT(!m_checkedButton);
     } else if (wasValid != isValid())
-        setNeedsValidityCheckForAllButtons();
+        updateValidityForAllButtons();
     if (!wasValid) {
         // A radio button not in a group is always valid. We need to make it
         // valid only if the group was invalid.
-        button->setNeedsValidityCheck();
+        button->updateValidity();
     }
 }
 
-void RadioButtonGroup::setNeedsValidityCheckForAllButtons()
+void RadioButtonGroup::updateValidityForAllButtons()
 {
     typedef HashSet<HTMLInputElement*>::const_iterator Iterator;
     Iterator end = m_members.end();
     for (Iterator it = m_members.begin(); it != end; ++it) {
         HTMLInputElement* button = *it;
         ASSERT(button->isRadioButton());
-        button->setNeedsValidityCheck();
+        button->updateValidity();
     }
 }
 
index f169d18..0543c5d 100644 (file)
@@ -341,7 +341,7 @@ void FileInputType::setFiles(PassRefPtr<FileList> files)
     m_fileList = files;
 
     input->setFormControlValueMatchesRenderer(true);
-    input->setNeedsValidityCheck();
+    input->updateValidity();
 
     Vector<String> paths;
     for (unsigned i = 0; i < m_fileList->length(); ++i)
index 28db92f..e5c4104 100644 (file)
@@ -200,9 +200,9 @@ const AtomicString& HTMLButtonElement::value() const
     return fastGetAttribute(valueAttr);
 }
 
-bool HTMLButtonElement::recalcWillValidate() const
+bool HTMLButtonElement::computeWillValidate() const
 {
-    return m_type == SUBMIT && HTMLFormControlElement::recalcWillValidate();
+    return m_type == SUBMIT && HTMLFormControlElement::computeWillValidate();
 }
 
 } // namespace
index e7e9e1d..1e01ec8 100644 (file)
@@ -69,7 +69,7 @@ private:
     virtual bool canStartSelection() const override { return false; }
 
     virtual bool isOptionalFormControl() const override { return true; }
-    virtual bool recalcWillValidate() const override;
+    virtual bool computeWillValidate() const override;
 
     Type m_type;
     bool m_isActivatedSubmit;
index fcb3463..401040a 100644 (file)
@@ -53,7 +53,7 @@ private:
     virtual bool supportsFocus() const override;
     virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
     virtual const AtomicString& formControlType() const override;
-    virtual bool recalcWillValidate() const override { return false; }
+    virtual bool computeWillValidate() const override { return false; }
     virtual void disabledAttributeChanged() override;
     virtual void disabledStateChanged() override;
     virtual void childrenChanged(const ChildChange&) override;
index cbcd206..22c533c 100644 (file)
@@ -167,7 +167,7 @@ void HTMLFormControlElement::readOnlyAttributeChanged()
 
 void HTMLFormControlElement::requiredAttributeChanged()
 {
-    setNeedsValidityCheck();
+    updateValidity();
     // Style recalculation is needed because style selectors may include
     // :required and :optional pseudo-classes.
     setNeedsStyleRecalc();
@@ -373,7 +373,7 @@ short HTMLFormControlElement::tabIndex() const
     return Element::tabIndex();
 }
 
-bool HTMLFormControlElement::recalcWillValidate() const
+bool HTMLFormControlElement::computeWillValidate() const
 {
     if (m_dataListAncestorState == Unknown) {
         for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
@@ -392,14 +392,14 @@ bool HTMLFormControlElement::willValidate() const
 {
     if (!m_willValidateInitialized || m_dataListAncestorState == Unknown) {
         m_willValidateInitialized = true;
-        bool newWillValidate = recalcWillValidate();
+        bool newWillValidate = computeWillValidate();
         if (m_willValidate != newWillValidate)
             m_willValidate = newWillValidate;
     } else {
         // If the following assertion fails, setNeedsWillValidateCheck() is not
-        // called correctly when something which changes recalcWillValidate() result
+        // called correctly when something which changes computeWillValidate() result
         // is updated.
-        ASSERT(m_willValidate == recalcWillValidate());
+        ASSERT(m_willValidate == computeWillValidate());
     }
     return m_willValidate;
 }
@@ -407,7 +407,7 @@ bool HTMLFormControlElement::willValidate() const
 void HTMLFormControlElement::setNeedsWillValidateCheck()
 {
     // We need to recalculate willValidate immediately because willValidate change can causes style change.
-    bool newWillValidate = recalcWillValidate();
+    bool newWillValidate = computeWillValidate();
     if (m_willValidateInitialized && m_willValidate == newWillValidate)
         return;
 
@@ -416,7 +416,7 @@ void HTMLFormControlElement::setNeedsWillValidateCheck()
     m_willValidateInitialized = true;
     m_willValidate = newWillValidate;
 
-    setNeedsValidityCheck();
+    updateValidity();
     setNeedsStyleRecalc();
 
     if (!m_willValidate && !wasValid)
@@ -460,13 +460,13 @@ bool HTMLFormControlElement::checkValidity(Vector<RefPtr<FormAssociatedElement>>
 
 inline bool HTMLFormControlElement::isValidFormControlElement() const
 {
-    // If the following assertion fails, setNeedsValidityCheck() is not called
+    // If the following assertion fails, updateValidity() is not called
     // correctly when something which changes validity is updated.
     ASSERT(m_isValid == valid());
     return m_isValid;
 }
 
-void HTMLFormControlElement::setNeedsValidityCheck()
+void HTMLFormControlElement::updateValidity()
 {
     bool willValidate = this->willValidate();
     bool wasValid = m_isValid;
@@ -494,7 +494,7 @@ void HTMLFormControlElement::setNeedsValidityCheck()
 void HTMLFormControlElement::setCustomValidity(const String& error)
 {
     FormAssociatedElement::setCustomValidity(error);
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 bool HTMLFormControlElement::validationMessageShadowTreeContains(const Node& node) const
index 2bd5f23..ef60415 100644 (file)
@@ -103,7 +103,7 @@ public:
     void hideVisibleValidationMessage();
     bool checkValidity(Vector<RefPtr<FormAssociatedElement>>* unhandledInvalidControls = 0);
     // This must be called when a validation constraint or control value is changed.
-    void setNeedsValidityCheck();
+    void updateValidity();
     virtual void setCustomValidity(const String&) override;
 
     bool isReadOnly() const { return m_isReadOnly; }
@@ -142,7 +142,7 @@ protected:
 
     // This must be called any time the result of willValidate() has changed.
     void setNeedsWillValidateCheck();
-    virtual bool recalcWillValidate() const;
+    virtual bool computeWillValidate() const;
 
     bool validationMessageShadowTreeContains(const Node&) const;
 
index d052861..53d8679 100644 (file)
@@ -527,7 +527,7 @@ inline void HTMLInputElement::runPostTypeUpdateTasks()
 
     addToRadioButtonGroup();
 
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLInputElement::subtreeHasChanged()
@@ -665,7 +665,7 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
             setNeedsStyleRecalc();
         }
         setFormControlValueMatchesRenderer(false);
-        setNeedsValidityCheck();
+        updateValidity();
         m_valueAttributeWasUpdatedAfterParsing = !m_parsingInProgress;
     } else if (name == checkedAttr) {
         // Another radio button in the same group might be checked by state
@@ -702,20 +702,20 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
         setNeedsStyleRecalc();
     } else if (name == minAttr) {
         m_inputType->minOrMaxAttributeChanged();
-        setNeedsValidityCheck();
+        updateValidity();
     } else if (name == maxAttr) {
         m_inputType->minOrMaxAttributeChanged();
-        setNeedsValidityCheck();
+        updateValidity();
     } else if (name == multipleAttr) {
         m_inputType->multipleAttributeChanged();
-        setNeedsValidityCheck();
+        updateValidity();
     } else if (name == stepAttr) {
         m_inputType->stepAttributeChanged();
-        setNeedsValidityCheck();
+        updateValidity();
     } else if (name == patternAttr) {
-        setNeedsValidityCheck();
+        updateValidity();
     } else if (name == precisionAttr) {
-        setNeedsValidityCheck();
+        updateValidity();
     } else if (name == disabledAttr) {
         HTMLTextFormControlElement::parseAttribute(name, value);
         m_inputType->disabledAttributeChanged();
@@ -859,7 +859,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
             buttons->updateCheckedState(this);
     if (renderer() && renderer()->style().hasAppearance())
         renderer()->theme().stateChanged(*renderer(), ControlStates::CheckedState);
-    setNeedsValidityCheck();
+    updateValidity();
 
     // Ideally we'd do this from the render tree (matching
     // RenderTextView), but it's not possible to do it at the moment
@@ -1003,7 +1003,7 @@ void HTMLInputElement::setValueInternal(const String& sanitizedValue, TextFieldE
 {
     m_valueIfDirty = sanitizedValue;
     m_wasModifiedByUser = eventBehavior != DispatchNoEvent;
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 double HTMLInputElement::valueAsDate() const
@@ -1050,7 +1050,7 @@ void HTMLInputElement::setValueFromRenderer(const String& value)
     if (!isTextField())
         dispatchInputEvent();
 
-    setNeedsValidityCheck();
+    updateValidity();
 
     // Clear autofill flag (and yellow background) on user edit.
     setAutofilled(false);
@@ -1509,9 +1509,9 @@ void HTMLInputElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
     addSubresourceURL(urls, src());
 }
 
-bool HTMLInputElement::recalcWillValidate() const
+bool HTMLInputElement::computeWillValidate() const
 {
-    return m_inputType->supportsValidation() && HTMLTextFormControlElement::recalcWillValidate();
+    return m_inputType->supportsValidation() && HTMLTextFormControlElement::computeWillValidate();
 }
 
 void HTMLInputElement::requiredAttributeChanged()
@@ -1732,7 +1732,7 @@ void HTMLInputElement::parseMaxLengthAttribute(const AtomicString& value)
     if (oldMaxLength != maxLength)
         updateValueIfNeeded();
     setNeedsStyleRecalc();
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLInputElement::updateValueIfNeeded()
index 0282479..ec0f365 100644 (file)
@@ -396,7 +396,7 @@ private:
 
     virtual bool isOptionalFormControl() const override final { return !isRequiredFormControl(); }
     virtual bool isRequiredFormControl() const override final;
-    virtual bool recalcWillValidate() const override final;
+    virtual bool computeWillValidate() const override final;
     virtual void requiredAttributeChanged() override final;
 
     void initializeInputType();
index df74ea2..1d208f8 100644 (file)
@@ -37,7 +37,7 @@ public:
 private:
     HTMLKeygenElement(const QualifiedName&, Document&, HTMLFormElement*);
 
-    virtual bool recalcWillValidate() const override { return false; }
+    virtual bool computeWillValidate() const override { return false; }
     virtual bool canStartSelection() const override { return false; }
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
index e84d008..83a9b64 100644 (file)
@@ -52,7 +52,7 @@ public:
 private:
     HTMLOutputElement(const QualifiedName&, Document&, HTMLFormElement*);
 
-    virtual bool recalcWillValidate() const override { return false; }
+    virtual bool computeWillValidate() const override { return false; }
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
     virtual const AtomicString& formControlType() const override;
     virtual bool isEnumeratable() const override { return true; }
index 472b369..cb15b6d 100644 (file)
@@ -104,7 +104,7 @@ const AtomicString& HTMLSelectElement::formControlType() const
 void HTMLSelectElement::deselectItems(HTMLOptionElement* excludeElement)
 {
     deselectItemsWithoutValidation(excludeElement);
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLSelectElement::optionSelectedByUser(int optionIndex, bool fireOnChangeNow, bool allowMultipleSelection)
@@ -113,7 +113,7 @@ void HTMLSelectElement::optionSelectedByUser(int optionIndex, bool fireOnChangeN
     // This produces that same behavior for changes triggered by other code running on behalf of the user.
     if (!usesMenuList()) {
         updateSelectedState(optionToListIndex(optionIndex), allowMultipleSelection, false);
-        setNeedsValidityCheck();
+        updateValidity();
         if (fireOnChangeNow)
             listBoxOnChange();
         return;
@@ -184,7 +184,7 @@ void HTMLSelectElement::listBoxSelectItem(int listIndex, bool allowMultiplySelec
         optionSelectedByUser(listToOptionIndex(listIndex), fireOnChangeNow, false);
     else {
         updateSelectedState(listIndex, allowMultiplySelections, shift);
-        setNeedsValidityCheck();
+        updateValidity();
         if (fireOnChangeNow)
             listBoxOnChange();
     }
@@ -227,7 +227,7 @@ void HTMLSelectElement::add(HTMLElement* element, HTMLElement* before, Exception
     Ref<HTMLElement> protectNewChild(*element);
 
     insertBefore(element, before, ec);
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLSelectElement::removeByIndex(int optionIndex)
@@ -313,7 +313,7 @@ void HTMLSelectElement::parseAttribute(const QualifiedName& name, const AtomicSt
             updateListItemSelectedStates();
 
         m_size = size;
-        setNeedsValidityCheck();
+        updateValidity();
         if (m_size != oldSize) {
             setNeedsStyleRecalc(ReconstructRenderTree);
             setRecalcListItems();
@@ -387,7 +387,7 @@ void HTMLSelectElement::updateListItemSelectedStates()
 void HTMLSelectElement::childrenChanged(const ChildChange& change)
 {
     setRecalcListItems();
-    setNeedsValidityCheck();
+    updateValidity();
     m_lastOnChangeSelection.clear();
 
     HTMLFormControlElementWithState::childrenChanged(change);
@@ -396,7 +396,7 @@ void HTMLSelectElement::childrenChanged(const ChildChange& change)
 void HTMLSelectElement::optionElementChildrenChanged()
 {
     setRecalcListItems();
-    setNeedsValidityCheck();
+    updateValidity();
 
     if (renderer()) {
         if (AXObjectCache* cache = renderer()->document().existingAXObjectCache())
@@ -494,7 +494,7 @@ void HTMLSelectElement::setLength(unsigned newLen, ExceptionCode& ec)
                 item->parentNode()->removeChild(item.get(), ec);
         }
     }
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 bool HTMLSelectElement::isRequiredFormControl() const
@@ -591,7 +591,7 @@ void HTMLSelectElement::selectAll()
 
     updateListBoxSelection(false);
     listBoxOnChange();
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLSelectElement::saveLastSelection()
@@ -656,7 +656,7 @@ void HTMLSelectElement::updateListBoxSelection(bool deselectOtherOptions)
     }
 
     scrollToSelection();
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLSelectElement::listBoxOnChange()
@@ -907,7 +907,7 @@ void HTMLSelectElement::selectOption(int optionIndex, SelectOptionFlags flags)
         }
     }
 
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 int HTMLSelectElement::optionToListIndex(int optionIndex) const
@@ -1039,14 +1039,14 @@ void HTMLSelectElement::restoreFormControlState(const FormControlState& state)
     }
 
     setOptionsChangedOnRenderer();
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLSelectElement::parseMultipleAttribute(const AtomicString& value)
 {
     bool oldUsesMenuList = usesMenuList();
     m_multiple = !value.isNull();
-    setNeedsValidityCheck();
+    updateValidity();
     if (oldUsesMenuList != usesMenuList())
         setNeedsStyleRecalc(ReconstructRenderTree);
 }
@@ -1103,7 +1103,7 @@ void HTMLSelectElement::reset()
 
     setOptionsChangedOnRenderer();
     setNeedsStyleRecalc();
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 #if !PLATFORM(WIN)
index 5837610..3e797b6 100644 (file)
@@ -205,7 +205,7 @@ void HTMLTextAreaElement::parseAttribute(const QualifiedName& name, const Atomic
     } else if (name == accesskeyAttr) {
         // ignore for the moment
     } else if (name == maxlengthAttr)
-        setNeedsValidityCheck();
+        updateValidity();
     else
         HTMLTextFormControlElement::parseAttribute(name, value);
 }
@@ -280,7 +280,7 @@ void HTMLTextAreaElement::subtreeHasChanged()
 {
     setChangedSinceLastFormControlChangeEvent(true);
     setFormControlValueMatchesRenderer(false);
-    setNeedsValidityCheck();
+    updateValidity();
 
     if (!focused())
         return;
@@ -357,14 +357,14 @@ void HTMLTextAreaElement::setValue(const String& value)
 {
     setValueCommon(value);
     m_isDirty = true;
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLTextAreaElement::setNonDirtyValue(const String& value)
 {
     setValueCommon(value);
     m_isDirty = false;
-    setNeedsValidityCheck();
+    updateValidity();
 }
 
 void HTMLTextAreaElement::setValueCommon(const String& newValue)