| Index: chrome/views/controls/button/radio_button.cc
|
| ===================================================================
|
| --- chrome/views/controls/button/radio_button.cc (revision 14167)
|
| +++ chrome/views/controls/button/radio_button.cc (working copy)
|
| @@ -81,13 +81,14 @@
|
| return false;
|
| }
|
|
|
| -void RadioButton::OnMouseReleased(const views::MouseEvent& event,
|
| - bool canceled) {
|
| +void RadioButton::OnMouseReleased(const MouseEvent& event, bool canceled) {
|
| native_wrapper_->SetPushed(false);
|
| - // Call through to toggle the button only if we're not already checked, since
|
| - // radio buttons can't be toggled like checkboxes.
|
| - if (!checked())
|
| - Checkbox::OnMouseReleased(event, canceled);
|
| + // Set the checked state to true only if we are unchecked, since we can't
|
| + // be toggled on and off like a checkbox.
|
| + if (!checked() && !canceled && HitTestLabel(event))
|
| + SetChecked(true);
|
| +
|
| + ButtonPressed();
|
| }
|
|
|
| std::string RadioButton::GetClassName() const {
|
|
|