[webkit-reviews] review granted: [Bug 215837] Implement DataTransfer constructor and multipart form filename encoding as other browsers do : [Attachment 407306] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 26 11:11:22 PDT 2020


youenn fablet <youennf at gmail.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 215837: Implement DataTransfer constructor and multipart form filename
encoding as other browsers do
https://bugs.webkit.org/show_bug.cgi?id=215837

Attachment 407306: Patch

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




--- Comment #6 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 407306
  --> https://bugs.webkit.org/attachment.cgi?id=407306
Patch

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

> Source/WebCore/dom/DataTransfer.cpp:97
> +    dataTransfer->m_effectAllowed = "none";

It is a bit sad to set it to none while we are initialising it to
uninitialised.
Can we change DataTransfer constructor?

> Source/WebCore/platform/network/FormDataBuilder.cpp:179
> +    appendQuoted(buffer, encoding.encode(filename,
UnencodableHandling::Entities));

Do we have test coverage?

>
LayoutTests/imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatran
sfer-types-expected.txt:3
> +FAIL Relationship between types and items assert_equals: expected
["text/plain"] but got ["text/plain"]

This error seems strange, we got what we expect so why are we failing?

>
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submissio
n-0/submit-file.sub.html:7
> +<form id=testform method=post
action="/html/semantics/forms/form-submission-0/resources/file-submission.py"
target=testframe enctype="multipart/form-data">

Might be better to use http://{{hosts[alt][]}}:{{ports[http][0]}}
That way we keep cross origin posting which might be useful for the test.

We will need to upload this change to WPT as well.
If you use webkit-patch upload, it might allow you to automate the process and
I can merge the changes in WPT.


More information about the webkit-reviews mailing list