summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/RadioInputType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/RadioInputType.cpp')
-rw-r--r--Source/WebCore/html/RadioInputType.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/WebCore/html/RadioInputType.cpp b/Source/WebCore/html/RadioInputType.cpp
index baec9e861..d31cc2daf 100644
--- a/Source/WebCore/html/RadioInputType.cpp
+++ b/Source/WebCore/html/RadioInputType.cpp
@@ -152,11 +152,15 @@ PassOwnPtr<ClickHandlingState> RadioInputType::willDispatchClick()
OwnPtr<ClickHandlingState> state = adoptPtr(new ClickHandlingState);
state->checked = element()->checked();
- state->indeterminate = element()->indeterminate();
state->checkedRadioButton = element()->checkedRadioButtons().checkedButtonForGroup(element()->name());
+#if PLATFORM(IOS)
+ state->indeterminate = element()->indeterminate();
+
if (element()->indeterminate())
element()->setIndeterminate(false);
+#endif
+
element()->setChecked(true, true);
return state.release();
@@ -174,7 +178,11 @@ void RadioInputType::didDispatchClick(Event* event, const ClickHandlingState& st
&& checkedRadioButton->name() == element()->name()) {
checkedRadioButton->setChecked(true);
}
+
+#if PLATFORM(IOS)
element()->setIndeterminate(state.indeterminate);
+#endif
+
}
// The work we did in willDispatchClick was default handling.
@@ -186,4 +194,13 @@ bool RadioInputType::isRadioButton() const
return true;
}
+bool RadioInputType::supportsIndeterminateAppearance() const
+{
+#if PLATFORM(IOS)
+ return true;
+#else
+ return false;
+#endif
+}
+
} // namespace WebCore