Bug 209531 - Avoid querying pasteboard strings while dragging content over a potential drop target
Summary: Avoid querying pasteboard strings while dragging content over a potential dro...
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: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2020-03-24 22:51 PDT by Wenson Hsieh
Modified: 2020-03-25 08:05 PDT (History)
6 users (show)

See Also:


Attachments
Patch (15.46 KB, patch)
2020-03-24 23:04 PDT, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Patch for landing (15.72 KB, patch)
2020-03-25 07:41 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 2020-03-24 22:51:15 PDT
Refactor some code running in the web process, such that it doesn’t need to ask for pasteboard data prior to drop (or paste).
Comment 1 Wenson Hsieh 2020-03-24 22:51:49 PDT
Work towards <rdar://problem/59611585>
Comment 2 Wenson Hsieh 2020-03-24 23:04:23 PDT
Created attachment 394471 [details]
Patch
Comment 3 Tim Horton 2020-03-24 23:12:30 PDT
Comment on attachment 394471 [details]
Patch

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

> Source/WebCore/ChangeLog:15
> +        This is incompatible with some changes in the near future which will prevent the web content process from any
> +        reading data from the pasteboard, if a paste or drop action has not yet been performed. To address this issue,

"any reading data"?
Comment 4 Ryosuke Niwa 2020-03-24 23:44:19 PDT
Comment on attachment 394471 [details]
Patch

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

> Source/WebCore/platform/PlatformPasteboard.h:102
>      WEBCORE_EXPORT Vector<String> typesSafeForDOMToReadAndWrite(const String& origin) const;
> +    WEBCORE_EXPORT bool containsDOMSafeStringForType(const String&) const;

For consistency, I suggest we call this containsStringSafeForDOMToReadForType
Comment 5 Wenson Hsieh 2020-03-25 07:19:44 PDT
Comment on attachment 394471 [details]
Patch

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

>> Source/WebCore/ChangeLog:15
>> +        reading data from the pasteboard, if a paste or drop action has not yet been performed. To address this issue,
> 
> "any reading data"?

Oops — fixed!

>> Source/WebCore/platform/PlatformPasteboard.h:102
>> +    WEBCORE_EXPORT bool containsDOMSafeStringForType(const String&) const;
> 
> For consistency, I suggest we call this containsStringSafeForDOMToReadForType

Sounds good — changed to containsStringSafeForDOMToReadForType.
Comment 6 Wenson Hsieh 2020-03-25 07:41:43 PDT
Created attachment 394494 [details]
Patch for landing
Comment 7 EWS 2020-03-25 08:05:58 PDT
Committed r258980: <https://trac.webkit.org/changeset/258980>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394494 [details].