Changeset 89777 in webkit
- Timestamp:
- Jun 26, 2011 6:47:50 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89774 r89777 1 2011-06-26 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 FileList::filenames should be FileList::paths, because it's more accurate. 6 https://bugs.webkit.org/show_bug.cgi?id=63414 7 8 Refactoring, no change in behavior. 9 10 * fileapi/FileList.cpp: 11 (WebCore::FileList::paths): Renamed from filenames. 12 * fileapi/FileList.h: 13 * html/FileInputType.cpp: 14 (WebCore::FileInputType::handleDOMActivateEvent): Changed to use filenames, also fixed a reach-unto-thyself whoopsie. 15 (WebCore::FileInputType::requestIcon): Ditto. 16 (WebCore::FileInputType::filesChosen): Ditto. 17 * rendering/RenderFileUploadControl.cpp: 18 (WebCore::RenderFileUploadControl::fileTextValue): Ditto. 19 1 20 2011-06-26 Young Han Lee <joybro@company100.net> 2 21 -
trunk/Source/WebCore/fileapi/FileList.cpp
r89523 r89777 42 42 } 43 43 44 Vector<String> FileList:: filenames() const44 Vector<String> FileList::paths() const 45 45 { 46 Vector<String> filenames;46 Vector<String> paths; 47 47 for (unsigned i = 0; i < m_files.size(); ++i) 48 filenames.append(m_files[i]->path());48 paths.append(m_files[i]->path()); 49 49 50 return filenames;50 return paths; 51 51 } 52 52 -
trunk/Source/WebCore/fileapi/FileList.h
r89523 r89777 48 48 void clear() { m_files.clear(); } 49 49 void append(PassRefPtr<File> file) { m_files.append(file); } 50 Vector<String> filenames() const;50 Vector<String> paths() const; 51 51 52 52 private: -
trunk/Source/WebCore/html/FileInputType.cpp
r89535 r89777 148 148 #endif 149 149 settings.acceptTypes = input->accept(); 150 ASSERT(input->files()); 151 settings.selectedFiles = input->files()->filenames(); 150 settings.selectedFiles = m_fileList->paths(); 152 151 chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings)); 153 152 } … … 253 252 } 254 253 255 void FileInputType::requestIcon(const Vector<String>& filenames)256 { 257 if (! filenames.size())254 void FileInputType::requestIcon(const Vector<String>& paths) 255 { 256 if (!paths.size()) 258 257 return; 259 258 260 259 if (Chrome* chrome = this->chrome()) 261 chrome->loadIconForFiles( filenames, newFileIconLoader());262 } 263 264 void FileInputType::filesChosen(const Vector<String>& filenames)260 chrome->loadIconForFiles(paths, newFileIconLoader()); 261 } 262 263 void FileInputType::filesChosen(const Vector<String>& paths) 265 264 { 266 265 HTMLInputElement* input = element(); 267 setFileList( filenames);266 setFileList(paths); 268 267 269 268 input->setFormControlValueMatchesRenderer(true); … … 271 270 input->setNeedsValidityCheck(); 272 271 273 requestIcon( filenames);272 requestIcon(paths); 274 273 275 274 if (input->renderer()) -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r89733 r89777 211 211 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); 212 212 ASSERT(input->files()); 213 return theme()->fileListNameForWidth(input->files()-> filenames(), style()->font(), maxFilenameWidth());213 return theme()->fileListNameForWidth(input->files()->paths(), style()->font(), maxFilenameWidth()); 214 214 } 215 215
Note: See TracChangeset
for help on using the changeset viewer.