Changeset 266187 in webkit
- Timestamp:
- Aug 26, 2020, 1:18:23 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/dom-constructors-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/dom/dom-constructors.html (modified) (2 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatransfer-constructor-001-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatransfer-types-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub.html (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/data-transfer-files.https-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/DataTransfer.cpp (modified) (3 diffs)
-
Source/WebCore/dom/DataTransfer.h (modified) (2 diffs)
-
Source/WebCore/dom/DataTransfer.idl (modified) (1 diff)
-
Source/WebCore/platform/network/FormDataBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r266168 r266187 1 2020-08-26 Alex Christensen <achristensen@webkit.org> 2 3 Implement DataTransfer constructor and multipart form filename encoding as other browsers do 4 https://bugs.webkit.org/show_bug.cgi?id=215837 5 6 Reviewed by Youenn Fablet. 7 8 * fast/dom/dom-constructors-expected.txt: 9 * fast/dom/dom-constructors.html: 10 1 11 2020-08-26 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/LayoutTests/fast/dom/dom-constructors-expected.txt
r256716 r266187 81 81 PASS TryAllocate('CSSValue') is 'exception' 82 82 PASS TryAllocate('CSSValueList') is 'exception' 83 PASS TryAllocate('DataTransfer') is 'exception'84 83 PASS TryAllocate('DOMImplementation') is 'exception' 85 84 PASS TryAllocate('HTMLCollection') is 'exception' … … 125 124 PASS TryAllocate('DOMParser') is '[object DOMParser]' 126 125 PASS TryAllocate('DOMParser') is '[object DOMParser]' 126 PASS TryAllocate('DataTransfer') is '[object DataTransfer]' 127 PASS TryAllocate('DataTransfer') is '[object DataTransfer]' 128 PASS TryAllocate('DataTransfer') is '[object DataTransfer]' 127 129 PASS TryAllocate('Document') is '[object Document]' 128 130 PASS TryAllocate('Document') is '[object Document]' -
trunk/LayoutTests/fast/dom/dom-constructors.html
r256716 r266187 91 91 'CSSValue', 92 92 'CSSValueList', 93 'DataTransfer',94 93 'DOMImplementation', 95 94 'HTMLCollection', … … 130 129 'Comment', 131 130 'DOMParser', 131 'DataTransfer', 132 132 'Document', 133 133 'DocumentFragment', -
trunk/LayoutTests/imported/w3c/ChangeLog
r266186 r266187 1 2020-08-26 Alex Christensen <achristensen@webkit.org> 2 3 Implement DataTransfer constructor and multipart form filename encoding as other browsers do 4 https://bugs.webkit.org/show_bug.cgi?id=215837 5 6 Reviewed by Youenn Fablet. 7 8 * web-platform-tests/FileAPI/file/send-file-form-expected.txt: 9 * web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt: 10 * web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt: 11 * web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt: 12 * web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt: 13 * web-platform-tests/html/editing/dnd/datastore/datatransfer-constructor-001-expected.txt: 14 * web-platform-tests/html/editing/dnd/datastore/datatransfer-types-expected.txt: 15 This test still fails because of bindings issues. DataTransfer.types should apparently return 16 a cached JSValue that is updated whenever the contents change, which I don't think our bindings 17 generator can handle right now, so these tests are now failing in a different way. 18 I think that's fine because I think most uses of DataTransfer.types will just be checking the contents, 19 not whether its === to a stored reference like these tests do. We should fix this later. 20 * web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub-expected.txt: 21 * web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub.html: 22 Updated to successfully submit the form to a listening server in our test infrastructure, 23 so that we see PASS like we do now on wpt.live 24 * web-platform-tests/service-workers/service-worker/data-transfer-files.https-expected.txt: 25 1 26 2020-08-26 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-expected.txt
r265749 r266187 1 1 2 FAIL Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 2 PASS Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative-expected.txt
r265749 r266187 1 1 2 FAIL Upload file-for-upload-in-form.txt (ASCII) in ISO-2022-JP form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 3 FAIL Upload file-for-upload-in-form-.txt (x-user-defined) in ISO-2022-JP form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 4 FAIL Upload file-for-upload-in-form-☺😂.txt (windows-1252) in ISO-2022-JP form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 5 FAIL Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in ISO-2022-JP form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 6 FAIL Upload file-for-upload-in-form-☺😂.txt (Unicode) in ISO-2022-JP form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 7 FAIL Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in ISO-2022-JP form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 2 PASS Upload file-for-upload-in-form.txt (ASCII) in ISO-2022-JP form 3 PASS Upload file-for-upload-in-form-.txt (x-user-defined) in ISO-2022-JP form 4 PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in ISO-2022-JP form 5 PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in ISO-2022-JP form 6 PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in ISO-2022-JP form 7 PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in ISO-2022-JP form 8 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8-expected.txt
r265749 r266187 1 1 2 FAIL Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 3 FAIL Upload file-for-upload-in-form-.txt (x-user-defined) in UTF-8 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 4 FAIL Upload file-for-upload-in-form-☺😂.txt (windows-1252) in UTF-8 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 5 FAIL Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in UTF-8 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 6 FAIL Upload file-for-upload-in-form-☺😂.txt (Unicode) in UTF-8 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 7 FAIL Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in UTF-8 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 2 PASS Upload file-for-upload-in-form.txt (ASCII) in UTF-8 form 3 PASS Upload file-for-upload-in-form-.txt (x-user-defined) in UTF-8 form 4 PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in UTF-8 form 5 PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in UTF-8 form 6 PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in UTF-8 form 7 PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in UTF-8 form 8 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative-expected.txt
r265749 r266187 1 1 2 FAIL Upload file-for-upload-in-form.txt (ASCII) in windows-1252 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 3 FAIL Upload file-for-upload-in-form-.txt (x-user-defined) in windows-1252 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 4 FAIL Upload file-for-upload-in-form-☺😂.txt (windows-1252) in windows-1252 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 5 FAIL Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in windows-1252 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 6 FAIL Upload file-for-upload-in-form-☺😂.txt (Unicode) in windows-1252 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 7 FAIL Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in windows-1252 form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 2 PASS Upload file-for-upload-in-form.txt (ASCII) in windows-1252 form 3 PASS Upload file-for-upload-in-form-.txt (x-user-defined) in windows-1252 form 4 PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in windows-1252 form 5 PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in windows-1252 form 6 PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in windows-1252 form 7 PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in windows-1252 form 8 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative-expected.txt
r265749 r266187 1 1 2 FAIL Upload file-for-upload-in-form.txt (ASCII) in x-user-defined form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 3 FAIL Upload file-for-upload-in-form-.txt (x-user-defined) in x-user-defined form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 4 FAIL Upload file-for-upload-in-form-☺😂.txt (windows-1252) in x-user-defined form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 5 FAIL Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in x-user-defined form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 6 FAIL Upload file-for-upload-in-form-☺😂.txt (Unicode) in x-user-defined form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 7 FAIL Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in x-user-defined form promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 2 PASS Upload file-for-upload-in-form.txt (ASCII) in x-user-defined form 3 PASS Upload file-for-upload-in-form-.txt (x-user-defined) in x-user-defined form 4 PASS Upload file-for-upload-in-form-☺😂.txt (windows-1252) in x-user-defined form 5 PASS Upload file-for-upload-in-form-★星★.txt (JIS X 0201 and JIS X 0208) in x-user-defined form 6 PASS Upload file-for-upload-in-form-☺😂.txt (Unicode) in x-user-defined form 7 PASS Upload file-for-upload-in-form-ABC~‾¥≈¤・・•∙·☼★星🌟星★☼·∙•・・¤≈¥‾~XYZ.txt (Unicode) in x-user-defined form 8 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatransfer-constructor-001-expected.txt
r265749 r266187 1 1 2 FAIL Verify DataTransfer constructor Illegal constructor 2 PASS Verify DataTransfer constructor 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatransfer-types-expected.txt
r265749 r266187 1 1 2 FAIL type's state on DataTransfer creation Illegal constructor3 FAIL Relationship between types and items Illegal constructor4 FAIL type's identity Illegal constructor5 FAIL Verify type is a read-only attribute Illegal constructor2 FAIL type's state on DataTransfer creation assert_equals: types must return the same object when the data store item list has not changed expected [] but got [] 3 FAIL Relationship between types and items assert_equals: expected ["text/plain"] but got ["text/plain"] 4 FAIL type's identity assert_equals: expected ["text/plain"] but got ["text/plain"] 5 FAIL Verify type is a read-only attribute assert_equals: expected [] but got [] 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub-expected.txt
r265749 r266187 2 2 3 3 4 FAIL Posting a File Illegal constructor 4 PASS Posting a File 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub.html
r249886 r266187 5 5 <body> 6 6 <iframe id=testframe name=testframe></iframe> 7 <form id=testform method=post action=" //{{domains[www1]}}:{{location[port]}}/html/semantics/forms/form-submission-0/resources/file-submission.py" target=testframe enctype="multipart/form-data">7 <form id=testform method=post action="http://{{hosts[alt][]}}:{{ports[http][0]}}/html/semantics/forms/form-submission-0/resources/file-submission.py" target=testframe enctype="multipart/form-data"> 8 8 <input name=testinput id=testinput type=file> 9 9 </form> -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/data-transfer-files.https-expected.txt
r265749 r266187 2 2 3 3 4 FAIL Posting a File in a navigation handled by a service worker promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 4 PASS Posting a File in a navigation handled by a service worker 5 5 -
trunk/Source/WebCore/ChangeLog
r266186 r266187 1 2020-08-26 Alex Christensen <achristensen@webkit.org> 2 3 Implement DataTransfer constructor and multipart form filename encoding as other browsers do 4 https://bugs.webkit.org/show_bug.cgi?id=215837 5 6 Reviewed by Youenn Fablet. 7 8 Covered by newly passing WPT tests that Chrome and Firefox both pass. 9 10 * dom/DataTransfer.cpp: 11 (WebCore::DataTransfer::create): 12 * dom/DataTransfer.h: 13 * dom/DataTransfer.idl: 14 * platform/network/FormDataBuilder.cpp: 15 (WebCore::FormDataBuilder::addFilenameToMultiPartHeader): 16 1 17 2020-08-26 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebCore/dom/DataTransfer.cpp
r266168 r266187 69 69 #endif 70 70 71 DataTransfer::DataTransfer(StoreMode mode, std::unique_ptr<Pasteboard> pasteboard, Type type )71 DataTransfer::DataTransfer(StoreMode mode, std::unique_ptr<Pasteboard> pasteboard, Type type, String&& effectAllowed) 72 72 : m_storeMode(mode) 73 73 , m_pasteboard(WTFMove(pasteboard)) … … 75 75 , m_type(type) 76 76 , m_dropEffect("uninitialized"_s) 77 , m_effectAllowed( "uninitialized"_s)77 , m_effectAllowed(WTFMove(effectAllowed)) 78 78 , m_shouldUpdateDragImage(false) 79 79 #endif 80 80 { 81 81 #if !ENABLE(DRAG_SUPPORT) 82 UNUSED_PARAM(effectAllowed); 82 83 ASSERT_UNUSED(type, type != Type::DragAndDropData && type != Type::DragAndDropFiles); 83 84 #endif … … 89 90 dataTransfer->m_originIdentifier = document.originIdentifierForPasteboard(); 90 91 return dataTransfer; 92 } 93 94 Ref<DataTransfer> DataTransfer::create() 95 { 96 return adoptRef(*new DataTransfer(StoreMode::ReadWrite, makeUnique<StaticPasteboard>(), Type::CopyAndPaste, "none"_s)); 91 97 } 92 98 -
trunk/Source/WebCore/dom/DataTransfer.h
r266168 r266187 48 48 enum class StoreMode { Invalid, ReadWrite, Readonly, Protected }; 49 49 50 static Ref<DataTransfer> create(); 50 51 static Ref<DataTransfer> createForCopyAndPaste(const Document&, StoreMode, std::unique_ptr<Pasteboard>&&); 51 52 static Ref<DataTransfer> createForInputEvent(const String& plainText, const String& htmlText); … … 115 116 private: 116 117 enum class Type { CopyAndPaste, DragAndDropData, DragAndDropFiles, InputEvent }; 117 DataTransfer(StoreMode, std::unique_ptr<Pasteboard>, Type = Type::CopyAndPaste );118 DataTransfer(StoreMode, std::unique_ptr<Pasteboard>, Type = Type::CopyAndPaste, String&& effectAllowed = "uninitialized"_s); 118 119 119 120 #if ENABLE(DRAG_SUPPORT) -
trunk/Source/WebCore/dom/DataTransfer.idl
r266168 r266187 30 30 SkipVTableValidation, 31 31 ] interface DataTransfer { 32 constructor(); 33 32 34 attribute DOMString dropEffect; 33 35 attribute DOMString effectAllowed; -
trunk/Source/WebCore/platform/network/FormDataBuilder.cpp
r254046 r266187 176 176 void addFilenameToMultiPartHeader(Vector<char>& buffer, const TextEncoding& encoding, const String& filename) 177 177 { 178 // FIXME: This loses data irreversibly if the filename includes characters you can't encode179 // in the website's character set.180 178 append(buffer, "; filename=\""); 181 appendQuoted(buffer, encoding.encode(filename, UnencodableHandling:: QuestionMarks));179 appendQuoted(buffer, encoding.encode(filename, UnencodableHandling::Entities)); 182 180 append(buffer, '"'); 183 181 }
Note:
See TracChangeset
for help on using the changeset viewer.