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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 if (Chrome* chrome = this->chrome()) { | 145 if (Chrome* chrome = this->chrome()) { |
146 FileChooserSettings settings; | 146 FileChooserSettings settings; |
147 HTMLInputElement* input = element(); | 147 HTMLInputElement* input = element(); |
148 settings.allowsDirectoryUpload = RuntimeEnabledFeatures::directoryUpload
Enabled() && input->fastHasAttribute(webkitdirectoryAttr); | 148 settings.allowsDirectoryUpload = RuntimeEnabledFeatures::directoryUpload
Enabled() && input->fastHasAttribute(webkitdirectoryAttr); |
149 settings.allowsMultipleFiles = settings.allowsDirectoryUpload || input->
fastHasAttribute(multipleAttr); | 149 settings.allowsMultipleFiles = settings.allowsDirectoryUpload || input->
fastHasAttribute(multipleAttr); |
150 settings.acceptMIMETypes = input->acceptMIMETypes(); | 150 settings.acceptMIMETypes = input->acceptMIMETypes(); |
151 settings.acceptFileExtensions = input->acceptFileExtensions(); | 151 settings.acceptFileExtensions = input->acceptFileExtensions(); |
152 settings.selectedFiles = m_fileList->paths(); | 152 settings.selectedFiles = m_fileList->paths(); |
153 #if ENABLE(MEDIA_CAPTURE) | 153 #if ENABLE(MEDIA_CAPTURE) |
154 settings.capture = input->capture(); | 154 settings.useMediaCapture = input->capture(); |
155 settings.useMediaCapture = input->fastHasAttribute(captureAttr); | |
156 #endif | 155 #endif |
157 chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings
)); | 156 chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings
)); |
158 } | 157 } |
159 event->setDefaultHandled(); | 158 event->setDefaultHandled(); |
160 } | 159 } |
161 | 160 |
162 RenderObject* FileInputType::createRenderer(RenderStyle*) const | 161 RenderObject* FileInputType::createRenderer(RenderStyle*) const |
163 { | 162 { |
164 return new (element()->document()->renderArena()) RenderFileUploadControl(el
ement()); | 163 return new (element()->document()->renderArena()) RenderFileUploadControl(el
ement()); |
165 } | 164 } |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 StringBuilder names; | 409 StringBuilder names; |
411 for (size_t i = 0; i < listSize; ++i) { | 410 for (size_t i = 0; i < listSize; ++i) { |
412 names.append(fileList->item(i)->name()); | 411 names.append(fileList->item(i)->name()); |
413 if (i != listSize - 1) | 412 if (i != listSize - 1) |
414 names.append('\n'); | 413 names.append('\n'); |
415 } | 414 } |
416 return names.toString(); | 415 return names.toString(); |
417 } | 416 } |
418 | 417 |
419 } // namespace WebCore | 418 } // namespace WebCore |
OLD | NEW |