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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 #if ENABLE(MEDIA_CAPTURE) | 152 #if ENABLE(MEDIA_CAPTURE) |
153 settings.useMediaCapture = input->capture(); | 153 settings.useMediaCapture = input->capture(); |
154 #endif | 154 #endif |
155 chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings
)); | 155 chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings
)); |
156 } | 156 } |
157 event->setDefaultHandled(); | 157 event->setDefaultHandled(); |
158 } | 158 } |
159 | 159 |
160 RenderObject* FileInputType::createRenderer(RenderStyle*) const | 160 RenderObject* FileInputType::createRenderer(RenderStyle*) const |
161 { | 161 { |
162 return new (element()->document()->renderArena()) RenderFileUploadControl(el
ement()); | 162 return new RenderFileUploadControl(element()); |
163 } | 163 } |
164 | 164 |
165 bool FileInputType::canSetStringValue() const | 165 bool FileInputType::canSetStringValue() const |
166 { | 166 { |
167 return false; | 167 return false; |
168 } | 168 } |
169 | 169 |
170 bool FileInputType::canChangeFromAnotherType() const | 170 bool FileInputType::canChangeFromAnotherType() const |
171 { | 171 { |
172 // Don't allow the type to be changed to file after the first type change. | 172 // Don't allow the type to be changed to file after the first type change. |
(...skipping 209 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)->name()); | 384 names.append(fileList->item(i)->name()); |
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 |