|
Handle JS-created files in <input type="file">.
The first associated bug shows a (contorted) series of steps which can
result in a non-user-selected file (created using the Filesystem API)
ending up in a file input element's FileList. The second associated bug
follows the pattern shown by the first bug's reporter, but uses a file
created by the File constructor. This causes a renderer crash.
Also, one day we might have a direct way to set an input's FileList, and
it should handle files created by JavaScript (specifically, by the the
Filesystem API and by the File constructor).
This change adds a flag to File objects that distinguishes between files
that come from a location visible to the user, and files that were
created programatically and are not on user-visible filesystems. The
latter category of files should not be browsed to when used to populate
an <input>.
The flag is used to fix the name displayed by a file upload input
element on Mac.
BUG= 360308, 367334
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178752
Total comments: 15
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+286 lines, -34 lines) |
Patch |
|
M |
LayoutTests/TestExpectations
|
View
|
1
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/files/file-in-input-display.html
|
View
|
1
2
|
1 chunk |
+84 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/http/tests/filesystem/input-display.html
|
View
|
1
2
|
1 chunk |
+99 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/platform/mac/fast/files/file-in-input-display-expected.png
|
View
|
|
Binary file |
0 comments
|
Download
|
|
A |
LayoutTests/platform/mac/fast/files/file-in-input-display-expected.txt
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/platform/mac/http/tests/filesystem/input-display-expected.png
|
View
|
|
Binary file |
0 comments
|
Download
|
|
A |
LayoutTests/platform/mac/http/tests/filesystem/input-display-expected.txt
|
View
|
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/bindings/core/v8/SerializedScriptValue.cpp
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/File.h
|
View
|
1
2
3
|
6 chunks |
+21 lines, -7 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/File.cpp
|
View
|
1
|
6 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/FileList.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/fileapi/FileList.cpp
|
View
|
1
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/html/forms/FileInputType.cpp
|
View
|
1
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/RenderThemeChromiumMac.mm
|
View
|
1
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/modules/filesystem/DOMFileSystemSync.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/web/WebDragData.cpp
|
View
|
1
|
1 chunk |
+20 lines, -12 lines |
0 comments
|
Download
|
Total messages: 20 (0 generated)
|