[webkit-reviews] review granted: [Bug 170637] REGRESSION(r210287) On drop, event.dataTransfer.getData("text") returns an empty string when dragging an image : [Attachment 319245] Fix iOS 10 build
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 29 17:45:15 PDT 2017
Ryosuke Niwa <rniwa at webkit.org> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 170637: REGRESSION(r210287) On drop, event.dataTransfer.getData("text")
returns an empty string when dragging an image
https://bugs.webkit.org/show_bug.cgi?id=170637
Attachment 319245: Fix iOS 10 build
https://bugs.webkit.org/attachment.cgi?id=319245&action=review
--- Comment #6 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 319245
--> https://bugs.webkit.org/attachment.cgi?id=319245
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.
More information about the webkit-reviews
mailing list