| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.capture = input->capture(); |
| 155 #endif | 155 #endif |
| 156 chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings
)); | 156 chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings
)); |
| 157 } | 157 } |
| 158 event->setDefaultHandled(); | 158 event->setDefaultHandled(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 RenderObject* FileInputType::createRenderer(RenderArena* arena, RenderStyle*) co
nst | 161 RenderObject* FileInputType::createRenderer(RenderStyle*) const |
| 162 { | 162 { |
| 163 return new (arena) RenderFileUploadControl(element()); | 163 return new RenderFileUploadControl(element()); |
| 164 } | 164 } |
| 165 | 165 |
| 166 bool FileInputType::canSetStringValue() const | 166 bool FileInputType::canSetStringValue() const |
| 167 { | 167 { |
| 168 return false; | 168 return false; |
| 169 } | 169 } |
| 170 | 170 |
| 171 bool FileInputType::canChangeFromAnotherType() const | 171 bool FileInputType::canChangeFromAnotherType() const |
| 172 { | 172 { |
| 173 // Don't allow the type to be changed to file after the first type change. | 173 // Don't allow the type to be changed to file after the first type change. |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 StringBuilder names; | 409 StringBuilder names; |
| 410 for (size_t i = 0; i < listSize; ++i) { | 410 for (size_t i = 0; i < listSize; ++i) { |
| 411 names.append(fileList->item(i)->name()); | 411 names.append(fileList->item(i)->name()); |
| 412 if (i != listSize - 1) | 412 if (i != listSize - 1) |
| 413 names.append('\n'); | 413 names.append('\n'); |
| 414 } | 414 } |
| 415 return names.toString(); | 415 return names.toString(); |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace WebCore | 418 } // namespace WebCore |
| OLD | NEW |