| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 value = "C:\\fakepath\\" + m_fileList->item(0)->name(); | 199 value = "C:\\fakepath\\" + m_fileList->item(0)->name(); |
| 200 return true; | 200 return true; |
| 201 } | 201 } |
| 202 | 202 |
| 203 void FileInputType::setValue(const String&, bool valueChanged, TextFieldEventBeh
avior) | 203 void FileInputType::setValue(const String&, bool valueChanged, TextFieldEventBeh
avior) |
| 204 { | 204 { |
| 205 if (!valueChanged) | 205 if (!valueChanged) |
| 206 return; | 206 return; |
| 207 | 207 |
| 208 m_fileList->clear(); | 208 m_fileList->clear(); |
| 209 element().setNeedsStyleRecalc(); | 209 element().setNeedsStyleRecalc(SubtreeStyleChange); |
| 210 element().setNeedsValidityCheck(); | 210 element().setNeedsValidityCheck(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 PassRefPtr<FileList> FileInputType::createFileList(const Vector<FileChooserFileI
nfo>& files) const | 213 PassRefPtr<FileList> FileInputType::createFileList(const Vector<FileChooserFileI
nfo>& files) const |
| 214 { | 214 { |
| 215 RefPtr<FileList> fileList(FileList::create()); | 215 RefPtr<FileList> fileList(FileList::create()); |
| 216 size_t size = files.size(); | 216 size_t size = files.size(); |
| 217 | 217 |
| 218 // If a directory is being selected, the UI allows a directory to be chosen | 218 // If a directory is being selected, the UI allows a directory to be chosen |
| 219 // and the paths provided here share a root directory somewhere up the tree; | 219 // and the paths provided here share a root directory somewhere up the tree; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 StringBuilder names; | 376 StringBuilder names; |
| 377 for (size_t i = 0; i < listSize; ++i) { | 377 for (size_t i = 0; i < listSize; ++i) { |
| 378 names.append(fileList->item(i)->name()); | 378 names.append(fileList->item(i)->name()); |
| 379 if (i != listSize - 1) | 379 if (i != listSize - 1) |
| 380 names.append('\n'); | 380 names.append('\n'); |
| 381 } | 381 } |
| 382 return names.toString(); | 382 return names.toString(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace WebCore | 385 } // namespace WebCore |
| OLD | NEW |