Index: Source/core/html/forms/CheckedRadioButtons.cpp |
diff --git a/Source/core/dom/CheckedRadioButtons.cpp b/Source/core/html/forms/CheckedRadioButtons.cpp |
similarity index 96% |
rename from Source/core/dom/CheckedRadioButtons.cpp |
rename to Source/core/html/forms/CheckedRadioButtons.cpp |
index 0dc3b4d47ab3b489f64c6c023643bc81ce4cdf74..58850fb8e11f474a58efbaa56e5db044e18ea97f 100644 |
--- a/Source/core/dom/CheckedRadioButtons.cpp |
+++ b/Source/core/html/forms/CheckedRadioButtons.cpp |
@@ -19,7 +19,7 @@ |
*/ |
#include "config.h" |
-#include "core/dom/CheckedRadioButtons.h" |
+#include "core/html/forms/CheckedRadioButtons.h" |
#include "core/html/HTMLInputElement.h" |
#include "wtf/HashSet.h" |
@@ -88,9 +88,9 @@ void RadioButtonGroup::add(HTMLInputElement* button) |
setCheckedButton(button); |
bool groupIsValid = isValid(); |
- if (groupWasValid != groupIsValid) |
+ if (groupWasValid != groupIsValid) { |
setNeedsValidityCheckForAllButtons(); |
- else if (!groupIsValid) { |
+ } 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(); |
@@ -102,9 +102,9 @@ void RadioButtonGroup::updateCheckedState(HTMLInputElement* button) |
ASSERT(button->isRadioButton()); |
ASSERT(m_members.contains(button)); |
bool wasValid = isValid(); |
- if (button->checked()) |
+ if (button->checked()) { |
setCheckedButton(button); |
- else { |
+ } else { |
if (m_checkedButton == button) |
m_checkedButton = 0; |
} |
@@ -117,9 +117,9 @@ void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button) |
ASSERT(button->isRadioButton()); |
ASSERT(m_members.contains(button)); |
bool wasValid = isValid(); |
- if (button->isRequired()) |
+ if (button->isRequired()) { |
++m_requiredCount; |
- else { |
+ } else { |
ASSERT(m_requiredCount); |
--m_requiredCount; |
} |
@@ -145,8 +145,9 @@ void RadioButtonGroup::remove(HTMLInputElement* button) |
if (m_members.isEmpty()) { |
ASSERT(!m_requiredCount); |
ASSERT(!m_checkedButton); |
- } else if (wasValid != isValid()) |
+ } else if (wasValid != isValid()) { |
setNeedsValidityCheckForAllButtons(); |
+ } |
if (!wasValid) { |
// A radio button not in a group is always valid. We need to make it |
// valid only if the group was invalid. |