Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: Source/core/html/forms/FileInputType.cpp

Issue 303473004: Remove the UseCounters for the capture attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
151 151
152 if (Chrome* chrome = this->chrome()) { 152 if (Chrome* chrome = this->chrome()) {
153 FileChooserSettings settings; 153 FileChooserSettings settings;
154 HTMLInputElement& input = element(); 154 HTMLInputElement& input = element();
155 settings.allowsDirectoryUpload = input.fastHasAttribute(webkitdirectoryA ttr); 155 settings.allowsDirectoryUpload = input.fastHasAttribute(webkitdirectoryA ttr);
156 settings.allowsMultipleFiles = settings.allowsDirectoryUpload || input.f astHasAttribute(multipleAttr); 156 settings.allowsMultipleFiles = settings.allowsDirectoryUpload || input.f astHasAttribute(multipleAttr);
157 settings.acceptMIMETypes = input.acceptMIMETypes(); 157 settings.acceptMIMETypes = input.acceptMIMETypes();
158 settings.acceptFileExtensions = input.acceptFileExtensions(); 158 settings.acceptFileExtensions = input.acceptFileExtensions();
159 settings.selectedFiles = m_fileList->paths(); 159 settings.selectedFiles = m_fileList->paths();
160 #if ENABLE(MEDIA_CAPTURE) 160 #if ENABLE(MEDIA_CAPTURE)
161 settings.useMediaCapture = input.capture(); 161 settings.useMediaCapture = input.isFileUpload() && input.fastHasAttribut e(captureAttr);
162 #endif 162 #endif
163 chrome->runOpenPanel(input.document().frame(), newFileChooser(settings)) ; 163 chrome->runOpenPanel(input.document().frame(), newFileChooser(settings)) ;
164 } 164 }
165 event->setDefaultHandled(); 165 event->setDefaultHandled();
166 } 166 }
167 167
168 RenderObject* FileInputType::createRenderer(RenderStyle*) const 168 RenderObject* FileInputType::createRenderer(RenderStyle*) const
169 { 169 {
170 return new RenderFileUploadControl(&element()); 170 return new RenderFileUploadControl(&element());
171 } 171 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 StringBuilder names; 389 StringBuilder names;
390 for (size_t i = 0; i < listSize; ++i) { 390 for (size_t i = 0; i < listSize; ++i) {
391 names.append(fileList->item(i)->name()); 391 names.append(fileList->item(i)->name());
392 if (i != listSize - 1) 392 if (i != listSize - 1)
393 names.append('\n'); 393 names.append('\n');
394 } 394 }
395 return names.toString(); 395 return names.toString();
396 } 396 }
397 397
398 } // namespace WebCore 398 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698