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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 String FileInputType::valueMissingText() const | 127 String FileInputType::valueMissingText() const |
128 { | 128 { |
129 return locale().queryString(element().multiple() ? WebLocalizedString::Valid
ationValueMissingForMultipleFile : WebLocalizedString::ValidationValueMissingFor
File); | 129 return locale().queryString(element().multiple() ? WebLocalizedString::Valid
ationValueMissingForMultipleFile : WebLocalizedString::ValidationValueMissingFor
File); |
130 } | 130 } |
131 | 131 |
132 void FileInputType::handleDOMActivateEvent(Event* event) | 132 void FileInputType::handleDOMActivateEvent(Event* event) |
133 { | 133 { |
134 if (element().isDisabledFormControl()) | 134 if (element().isDisabledFormControl()) |
135 return; | 135 return; |
136 | 136 |
137 if (!UserGestureIndicator::processingUserGesture()) | 137 if (!UserGestureIndicator::utilizeUserGesture()) |
138 return; | 138 return; |
139 | 139 |
140 if (ChromeClient* chromeClient = this->chromeClient()) { | 140 if (ChromeClient* chromeClient = this->chromeClient()) { |
141 FileChooserSettings settings; | 141 FileChooserSettings settings; |
142 HTMLInputElement& input = element(); | 142 HTMLInputElement& input = element(); |
143 settings.allowsDirectoryUpload = input.fastHasAttribute(webkitdirectoryA
ttr); | 143 settings.allowsDirectoryUpload = input.fastHasAttribute(webkitdirectoryA
ttr); |
144 settings.allowsMultipleFiles = settings.allowsDirectoryUpload || input.f
astHasAttribute(multipleAttr); | 144 settings.allowsMultipleFiles = settings.allowsDirectoryUpload || input.f
astHasAttribute(multipleAttr); |
145 settings.acceptMIMETypes = input.acceptMIMETypes(); | 145 settings.acceptMIMETypes = input.acceptMIMETypes(); |
146 settings.acceptFileExtensions = input.acceptFileExtensions(); | 146 settings.acceptFileExtensions = input.acceptFileExtensions(); |
147 settings.selectedFiles = m_fileList->pathsForUserVisibleFiles(); | 147 settings.selectedFiles = m_fileList->pathsForUserVisibleFiles(); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 StringBuilder names; | 370 StringBuilder names; |
371 for (size_t i = 0; i < listSize; ++i) { | 371 for (size_t i = 0; i < listSize; ++i) { |
372 names.append(fileList->item(i)->name()); | 372 names.append(fileList->item(i)->name()); |
373 if (i != listSize - 1) | 373 if (i != listSize - 1) |
374 names.append('\n'); | 374 names.append('\n'); |
375 } | 375 } |
376 return names.toString(); | 376 return names.toString(); |
377 } | 377 } |
378 | 378 |
379 } // namespace blink | 379 } // namespace blink |
OLD | NEW |