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

Side by Side Diff: Source/WebCore/html/FileInputType.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/html/CheckboxInputType.cpp ('k') | Source/WebCore/html/HTMLFormControlElement.h » ('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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return true; 122 return true;
123 } 123 }
124 124
125 for (unsigned i = 0; i < numFiles; ++i) 125 for (unsigned i = 0; i < numFiles; ++i)
126 encoding.appendBlob(element()->name(), fileList->item(i)); 126 encoding.appendBlob(element()->name(), fileList->item(i));
127 return true; 127 return true;
128 } 128 }
129 129
130 bool FileInputType::valueMissing(const String& value) const 130 bool FileInputType::valueMissing(const String& value) const
131 { 131 {
132 return element()->required() && value.isEmpty(); 132 return value.isEmpty();
133 } 133 }
134 134
135 String FileInputType::valueMissingText() const 135 String FileInputType::valueMissingText() const
136 { 136 {
137 return element()->multiple() ? validationMessageValueMissingForMultipleFileT ext() : validationMessageValueMissingForFileText(); 137 return element()->multiple() ? validationMessageValueMissingForMultipleFileT ext() : validationMessageValueMissingForFileText();
138 } 138 }
139 139
140 void FileInputType::handleDOMActivateEvent(Event* event) 140 void FileInputType::handleDOMActivateEvent(Event* event)
141 { 141 {
142 if (element()->disabled() || !element()->renderer()) 142 if (element()->disabled() || !element()->renderer())
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 StringBuilder names; 382 StringBuilder names;
383 for (size_t i = 0; i < listSize; ++i) { 383 for (size_t i = 0; i < listSize; ++i) {
384 names.append(fileList->item(i)->fileName()); 384 names.append(fileList->item(i)->fileName());
385 if (i != listSize - 1) 385 if (i != listSize - 1)
386 names.append('\n'); 386 names.append('\n');
387 } 387 }
388 return names.toString(); 388 return names.toString();
389 } 389 }
390 390
391 } // namespace WebCore 391 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/html/CheckboxInputType.cpp ('k') | Source/WebCore/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698