RESOLVED FIXED 176800
[Cleanup] Cleanup uses of the FileList class
https://bugs.webkit.org/show_bug.cgi?id=176800
Summary [Cleanup] Cleanup uses of the FileList class
Sam Weinig
Reported 2017-09-12 13:13:06 PDT
[Cleanup] Cleanup uses of the FileList class
Attachments
Patch (29.34 KB, patch)
2017-09-12 13:42 PDT, Sam Weinig
no flags
Patch (29.35 KB, patch)
2017-09-12 14:34 PDT, Sam Weinig
no flags
Sam Weinig
Comment 1 2017-09-12 13:42:31 PDT
Build Bot
Comment 2 2017-09-12 13:44:32 PDT
Attachment 320564 [details] did not pass style-queue: ERROR: Source/WebCore/platform/gtk/DragDataGtk.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 3 2017-09-12 14:34:35 PDT
Build Bot
Comment 4 2017-09-12 14:37:10 PDT
Attachment 320568 [details] did not pass style-queue: ERROR: Source/WebCore/platform/gtk/DragDataGtk.cpp:0: No copyright message found. You should have a line: "Copyright [year] <Copyright Owner>" [legal/copyright] [5] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 5 2017-09-13 23:43:58 PDT
Comment on attachment 320568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320568&action=review > Source/WebCore/bindings/js/SerializedScriptValue.cpp:2700 > if (!readFile(file)) > return JSValue(); > if (m_isDOMGlobalObject) > - files.append(WTFMove(file)); > + files.append(file.releaseNonNull()); This would be nicer if you made readFile take no parameters and return a RefPtr.
WebKit Commit Bot
Comment 6 2017-09-14 09:22:11 PDT
Comment on attachment 320568 [details] Patch Clearing flags on attachment: 320568 Committed r222025: <http://trac.webkit.org/changeset/222025>
WebKit Commit Bot
Comment 7 2017-09-14 09:22:12 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 8 2017-09-14 17:45:01 PDT
Comment on attachment 320568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320568&action=review > Source/WebCore/html/FileInputType.cpp:156 > + auto* fileList = element().files(); > + ASSERT(fileList); I would write: ASSERT(element().files()); auto& fileList = *element().files(); > Source/WebCore/html/FormController.h:48 > + m_values.append(value); Can this be done more efficiently? Seems like this will allocate a larger Vector than is needed.
Sam Weinig
Comment 9 2017-09-15 08:47:58 PDT
(In reply to Darin Adler from comment #8) > Comment on attachment 320568 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=320568&action=review > > > Source/WebCore/html/FileInputType.cpp:156 > > + auto* fileList = element().files(); > > + ASSERT(fileList); > > I would write: > > ASSERT(element().files()); > auto& fileList = *element().files(); > > > Source/WebCore/html/FormController.h:48 > > + m_values.append(value); > > Can this be done more efficiently? Seems like this will allocate a larger > Vector than is needed. Thanks. I'll address these with https://bugs.webkit.org/show_bug.cgi?id=177004.
Radar WebKit Bug Importer
Comment 10 2017-09-27 12:27:54 PDT
Note You need to log in before you can comment on or make changes to this bug.