Changeset 285932 in webkit
- Timestamp:
- Nov 17, 2021, 9:27:34 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/FileInputType.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r285931 r285932 1 2021-11-17 Andreu Botella <andreu@andreubotella.com> 2 3 Fix formatting and string literals in FileInputType.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=233229 5 6 Reviewed by Darin Adler. 7 8 This change uses the emptyString() and defaultMIMEType() functions rather than using string 9 literals, fixes the coding style, and reverts an unnecessary change in the comments. 10 11 This fixes code review suggestions from https://bugs.webkit.org/show_bug.cgi?id=185416 and 12 https://bugs.webkit.org/show_bug.cgi?id=221549 13 14 * html/FileInputType.cpp: 15 (WebCore::FileInputType::appendFormData const): 16 1 17 2021-11-17 Alan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/html/FileInputType.cpp
r285861 r285932 172 172 173 173 if (fileList->isEmpty()) 174 formData.append(name, "");174 formData.append(name, emptyString()); 175 175 176 176 for (auto& file : fileList->files()) … … 179 179 } 180 180 181 // If no filename at all is entered, return successful but empty, with 182 // application/octet-stream content type. Null would be more logical, but 183 // Netscape posts an empty file. Argh. 181 // If no filename at all is entered, return successful but empty. 182 // Null would be more logical, but Netscape posts an empty file. Argh. 184 183 if (fileList->isEmpty()) { 185 184 auto* document = element() ? &element()->document() : nullptr; 186 auto file = File::create( 187 document, 188 Blob::create(document, { }, "application/octet-stream"), 189 emptyString()); 185 auto file = File::create(document, Blob::create(document, { }, defaultMIMEType()), emptyString()); 190 186 formData.append(name, file); 191 187 return true;
Note:
See TracChangeset
for help on using the changeset viewer.