Summary: | DataTransfer.items does not contain items for custom types supplied via add or setData | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||||||
Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | buildbot, cdumez, commit-queue, darin, dbates, esprehn+autocc, kangil.han, rniwa, webkit-bug-importer, wenson_hsieh | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Wenson Hsieh
2017-10-06 10:24:46 PDT
Created attachment 323115 [details]
Patch
Comment on attachment 323115 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323115&action=review > Source/WebCore/dom/DataTransfer.cpp:145 > + auto lowercaseType = type.stripWhiteSpace().convertToASCIILowercase(); It is probably not right to use stringWhiteSpace here; that function uses the Unicode definition of whitespace, not the one that we’d normally use in HTML. Instead we would normally use stripLeadingAndTrailingHTMLSpaces. > Source/WebCore/dom/DataTransfer.cpp:146 > + if (Settings::customPasteboardDataEnabled() && !Pasteboard::isSafeTypeForDOMToReadAndWrite(lowercaseType)) It would be nice to have a named function for this test that we do in three different places in this patch. Comment on attachment 323115 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323115&action=review >> Source/WebCore/dom/DataTransfer.cpp:145 >> + auto lowercaseType = type.stripWhiteSpace().convertToASCIILowercase(); > > It is probably not right to use stringWhiteSpace here; that function uses the Unicode definition of whitespace, not the one that we’d normally use in HTML. Instead we would normally use stripLeadingAndTrailingHTMLSpaces. Fixed. I also adjusted normalizeTypes() to do the same. >> Source/WebCore/dom/DataTransfer.cpp:146 >> + if (Settings::customPasteboardDataEnabled() && !Pasteboard::isSafeTypeForDOMToReadAndWrite(lowercaseType)) > > It would be nice to have a named function for this test that we do in three different places in this patch. Sounds good! Created attachment 323128 [details]
Wait for EWS
Comment on attachment 323128 [details] Wait for EWS Attachment 323128 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4794263 New failing tests: editing/pasteboard/data-transfer-get-data-non-normalized-types.html Created attachment 323138 [details]
Archive of layout-test-results from ews102 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 323139 [details]
Fix test expectation
Comment on attachment 323139 [details] Fix test expectation Clearing flags on attachment: 323139 Committed r223034: <http://trac.webkit.org/changeset/223034> |