Summary: | REGRESSION(r210287) On drop, event.dataTransfer.getData("text") returns an empty string when dragging an image | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||||||||
Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | beidson, buildbot, cdumez, commit-queue, dbates, enrica, esprehn+autocc, kangil.han, rniwa, thorton, webkit-bug-importer, wenson_hsieh, zarema.khalilova | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Wenson Hsieh
2017-04-07 20:09:59 PDT
*** Bug 174259 has been marked as a duplicate of this bug. *** BTW this broke in https://trac.webkit.org/changeset/210287/webkit Created attachment 319243 [details]
First pass
Created attachment 319245 [details]
Fix iOS 10 build
Comment on attachment 319245 [details] Fix iOS 10 build View in context: https://bugs.webkit.org/attachment.cgi?id=319245&action=review > Source/WebCore/dom/DataTransfer.h:99 > + enum class SuppressDataAccessReason { None, ContainsFileURL }; I'm not certain this enum needs to say "SuppressDataAccess". I think it's probably sufficient to have an enum like `enum class ContainFiles { Yes, No }`. It's also okay to just use boolean m_containsFiles if the only place where we set this to true was simply calling a method named containsFiles(). > Source/WebCore/platform/DragData.cpp:62 > +bool DragData::containsFilePaths() const > +{ > + Vector<String> filenames; > + asFilenames(filenames); > + return filenames.size(); > +} > + Can't we do this check inside DataTransfer object since it also has access to Pasteboard::getFilenames()? > LayoutTests/editing/pasteboard/drag-drop-href-as-text-data.html:1 > +<style> Missing DOCTYPE. Comment on attachment 319245 [details] Fix iOS 10 build View in context: https://bugs.webkit.org/attachment.cgi?id=319245&action=review >> Source/WebCore/dom/DataTransfer.h:99 >> + enum class SuppressDataAccessReason { None, ContainsFileURL }; > > I'm not certain this enum needs to say "SuppressDataAccess". > I think it's probably sufficient to have an enum like `enum class ContainFiles { Yes, No }`. > It's also okay to just use boolean m_containsFiles if the only place where we set this to true was simply calling a method named containsFiles(). Sounds good -- fixed. >> Source/WebCore/platform/DragData.cpp:62 >> + > > Can't we do this check inside DataTransfer object since it also has access to Pasteboard::getFilenames()? Yes -- I'll remove this DragData helper then. >> LayoutTests/editing/pasteboard/drag-drop-href-as-text-data.html:1 >> +<style> > > Missing DOCTYPE. Added. Created attachment 319335 [details]
Patch for landing
Created attachment 319337 [details]
Patch for landing
Comment on attachment 319337 [details] Patch for landing Clearing flags on attachment: 319337 Committed r221343: <http://trac.webkit.org/changeset/221343> |