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

Side by Side Diff: Source/WebCore/html/CheckboxInputType.cpp

Issue 9805002: Revert 105710 - Introduce RadioButtonGroup class to keep track of the group members and required st… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/dom/CheckedRadioButtons.cpp ('k') | Source/WebCore/html/FileInputType.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return adoptPtr(new CheckboxInputType(element)); 44 return adoptPtr(new CheckboxInputType(element));
45 } 45 }
46 46
47 const AtomicString& CheckboxInputType::formControlType() const 47 const AtomicString& CheckboxInputType::formControlType() const
48 { 48 {
49 return InputTypeNames::checkbox(); 49 return InputTypeNames::checkbox();
50 } 50 }
51 51
52 bool CheckboxInputType::valueMissing(const String&) const 52 bool CheckboxInputType::valueMissing(const String&) const
53 { 53 {
54 return element()->required() && !element()->checked(); 54 return !element()->checked();
55 } 55 }
56 56
57 String CheckboxInputType::valueMissingText() const 57 String CheckboxInputType::valueMissingText() const
58 { 58 {
59 return validationMessageValueMissingForCheckboxText(); 59 return validationMessageValueMissingForCheckboxText();
60 } 60 }
61 61
62 void CheckboxInputType::handleKeyupEvent(KeyboardEvent* event) 62 void CheckboxInputType::handleKeyupEvent(KeyboardEvent* event)
63 { 63 {
64 const String& key = event->keyIdentifier(); 64 const String& key = event->keyIdentifier();
(...skipping 30 matching lines...) Expand all
95 // The work we did in willDispatchClick was default handling. 95 // The work we did in willDispatchClick was default handling.
96 event->setDefaultHandled(); 96 event->setDefaultHandled();
97 } 97 }
98 98
99 bool CheckboxInputType::isCheckbox() const 99 bool CheckboxInputType::isCheckbox() const
100 { 100 {
101 return true; 101 return true;
102 } 102 }
103 103
104 } // namespace WebCore 104 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/dom/CheckedRadioButtons.cpp ('k') | Source/WebCore/html/FileInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698