Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1123)

Unified Diff: Source/core/html/forms/CheckedRadioButtons.cpp

Issue 24246011: Move form-related 78 files to core/html/forms/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/forms/CheckedRadioButtons.h ('k') | Source/core/html/forms/ColorInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « Source/core/html/forms/CheckedRadioButtons.h ('k') | Source/core/html/forms/ColorInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698