[webkit-reviews] review denied: [Bug 177853] Add basic support for the version of DataTransferItemList.add that takes a File : [Attachment 322691] Support adding and removing the same File

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 4 12:48:02 PDT 2017


Ryosuke Niwa <rniwa at webkit.org> has denied Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 177853: Add basic support for the version of DataTransferItemList.add that
takes a File
https://bugs.webkit.org/show_bug.cgi?id=177853

Attachment 322691: Support adding and removing the same File

https://bugs.webkit.org/attachment.cgi?id=322691&action=review




--- Comment #11 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 322691
  --> https://bugs.webkit.org/attachment.cgi?id=322691
Support adding and removing the same File

View in context: https://bugs.webkit.org/attachment.cgi?id=322691&action=review

> Source/WebCore/dom/DataTransfer.cpp:174
> +    // We don't destroy and recreate the entire FileList here because the
FileList object needs to stay the same, per the DataTransfer spec.
> +    // Instead, flag the file list for an update, so the next time it is
queried, we recompute the state, respecting any updated data transfer items.
> +    m_fileList->clear();
> +    m_fileListNeedsUpdate = true;

This won't quite work because JS can hold onto a reference to FileList object.
So if the script calls dataTransfer.files first, removes a file via
dataTransfer.items.remove,
and then accesses the FileList without calling dataTransfer.files,
then they're gonna see an empty file list.


More information about the webkit-reviews mailing list