OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |