Bug 187130 - [iOS] DataTransfer.getData always returns the empty string when dropping text
Summary: [iOS] DataTransfer.getData always returns the empty string when dropping text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-27 19:58 PDT by Wenson Hsieh
Modified: 2018-06-28 17:21 PDT (History)
12 users (show)

See Also:


Attachments
Patch (30.61 KB, patch)
2018-06-27 22:18 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (30.61 KB, patch)
2018-06-27 22:32 PDT, Wenson Hsieh
rniwa: review+
Details | Formatted Diff | Diff
Archive of layout-test-results from ews202 for win-future (12.92 MB, application/zip)
2018-06-28 03:59 PDT, Build Bot
no flags Details
Patch for landing (29.57 KB, patch)
2018-06-28 16:13 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2018-06-27 19:58:26 PDT
<rdar://problem/41014117>
Comment 1 Wenson Hsieh 2018-06-27 22:18:58 PDT
Created attachment 343794 [details]
Patch
Comment 2 Wenson Hsieh 2018-06-27 22:32:46 PDT
Created attachment 343796 [details]
Patch
Comment 3 Build Bot 2018-06-28 03:59:47 PDT
Comment on attachment 343796 [details]
Patch

Attachment 343796 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8368322

New failing tests:
http/tests/preload/onload_event.html
Comment 4 Build Bot 2018-06-28 03:59:59 PDT
Created attachment 343805 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 5 Ryosuke Niwa 2018-06-28 15:28:04 PDT
Comment on attachment 343796 [details]
Patch

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

> Source/WebCore/dom/DataTransferItemList.cpp:143
> +        for (auto& file : m_dataTransfer.files().files())

Why do we need to check this given filesFromPasteboardAndItemList already check this condition?

> Source/WebCore/platform/PasteboardItemInfo.h:43
> +    bool hasDeclaredNonTextType { false };

Can we just say isNonTextType? It seems rather wordy to say "has declared".

> Source/WebCore/platform/cocoa/PasteboardCocoa.mm:162
> +            // The preferred presentation style is the most direct indication of whether this item represents file-

I think this comment is redundant with the one long description above. Remove?
Comment 6 Wenson Hsieh 2018-06-28 15:37:27 PDT
Comment on attachment 343796 [details]
Patch

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

>> Source/WebCore/dom/DataTransferItemList.cpp:143
>> +        for (auto& file : m_dataTransfer.files().files())
> 
> Why do we need to check this given filesFromPasteboardAndItemList already check this condition?

Good catch — we don't need this since the other check already ensures that DataTransfer.files() is empty. Removed!

>> Source/WebCore/platform/PasteboardItemInfo.h:43
>> +    bool hasDeclaredNonTextType { false };
> 
> Can we just say isNonTextType? It seems rather wordy to say "has declared".

Done!

>> Source/WebCore/platform/cocoa/PasteboardCocoa.mm:162
>> +            // The preferred presentation style is the most direct indication of whether this item represents file-
> 
> I think this comment is redundant with the one long description above. Remove?

Sounds good! Removed.
Comment 7 Wenson Hsieh 2018-06-28 16:13:27 PDT
Created attachment 343869 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2018-06-28 16:53:03 PDT
Comment on attachment 343869 [details]
Patch for landing

Clearing flags on attachment: 343869

Committed r233339: <https://trac.webkit.org/changeset/233339>