RESOLVED FIXED 171177
File inputs only accept UTI types that can be inserted into contenteditable areas when dropping
https://bugs.webkit.org/show_bug.cgi?id=171177
Summary File inputs only accept UTI types that can be inserted into contenteditable a...
Wenson Hsieh
Reported 2017-04-22 16:55:43 PDT
Attachments
Patch (7.59 KB, patch)
2017-04-22 17:56 PDT, Wenson Hsieh
no flags
Minor renaming (7.54 KB, patch)
2017-04-22 18:05 PDT, Wenson Hsieh
aestes: review+
buildbot: commit-queue-
Archive of layout-test-results from ews112 for mac-elcapitan (1.79 MB, application/zip)
2017-04-22 19:32 PDT, Build Bot
no flags
Fix Win/GTK builds (9.02 KB, patch)
2017-04-22 19:38 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2017-04-22 17:56:42 PDT
Wenson Hsieh
Comment 2 2017-04-22 18:05:28 PDT
Created attachment 307916 [details] Minor renaming
Andy Estes
Comment 3 2017-04-22 18:56:19 PDT
Comment on attachment 307916 [details] Minor renaming This makes dragging incompatible content a little more expensive now that there's always a hit test in canProcessDrag(). Are you concerned about that?
Wenson Hsieh
Comment 4 2017-04-22 19:03:55 PDT
Thanks for taking a look Andy! (In reply to Andy Estes from comment #3) > Comment on attachment 307916 [details] > Minor renaming > > This makes dragging incompatible content a little more expensive now that > there's always a hit test in canProcessDrag(). Are you concerned about that? This is true. But I think in the vast majority of cases, there is compatible content in the pasteboard, and even in the cases where there isn't compatible content, we will end up incurring the same cost as if there were compatible content, which AFAIK isn't an issue currently.
Andy Estes
Comment 5 2017-04-22 19:07:45 PDT
Comment on attachment 307916 [details] Minor renaming Actually, can't you just change DragData::containsCompatibleContent() to check for kUTTypeContent? That would avoid the extra hit testing it seems.
Wenson Hsieh
Comment 6 2017-04-22 19:09:20 PDT
(In reply to Andy Estes from comment #5) > Comment on attachment 307916 [details] > Minor renaming > > Actually, can't you just change DragData::containsCompatibleContent() to > check for kUTTypeContent? That would avoid the extra hit testing it seems. That would work when dragging over file inputs, but that would produce incorrect behavior when dropping into an editable area (for example, a JSON file should not be allowed to drop into a contenteditable).
Andy Estes
Comment 7 2017-04-22 19:32:12 PDT
Comment on attachment 307916 [details] Minor renaming I talked to Wenson on IRC and he explained why we can't check for a UTI in containsCompatibleContent() without hit-testing first. Thanks, Wenson!
Build Bot
Comment 8 2017-04-22 19:32:57 PDT
Comment on attachment 307916 [details] Minor renaming Attachment 307916 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3586948 New failing tests: webrtc/datachannel/basic.html
Build Bot
Comment 9 2017-04-22 19:32:58 PDT
Created attachment 307917 [details] Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Wenson Hsieh
Comment 10 2017-04-22 19:38:43 PDT
Created attachment 307918 [details] Fix Win/GTK builds
Build Bot
Comment 11 2017-04-22 19:45:54 PDT
Attachment 307918 [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 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Wenson Hsieh
Comment 12 2017-04-22 20:54:13 PDT
Committed <https://trac.webkit.org/changeset/215669/webkit>. WebRTC, RTL visual viewport, and audio-related test failures/flakiness encountered on EWS seem unrelated.
Note You need to log in before you can comment on or make changes to this bug.