[Webkit-unassigned] [Bug 195537] Multiple File Input Icon Set Regardless of File List

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 8 14:54:24 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=195537

--- Comment #34 from Alexey Proskuryakov <ap at webkit.org> ---
Very cool.

> This has to be manually set (and not built from the file) because TestRunner is not always going through ObjC flows, and I didn't want to complicate our testing code with calling ObjC icon APIs from C++ code.

Can you elaborate on this? This is quite different from the approach I had in mind, but I don't know if there is some obstacle.

I thought that we could add a testRunner or Internals function that creates a FileList object out of a list of paths, its invocation would be very similar to beginDragWithFiles(). Once there is a FileList object, it can be simply assigned to input.files in JavaScript, and then the engine takes care of figuring out the icon.

So the test would just do 

var file1 = document.getElementById('file1');
file1.files = testRunner.createFileList(["resources/something.txt"]);
file1.value = '';

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190408/fc59e368/attachment.html>


More information about the webkit-unassigned mailing list