Move more code into PasteboardCustomData
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 00:22:17 +0000 (00:22 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 00:22:17 +0000 (00:22 +0000)
commite535f59c88166d71d0617d9759823f4d7a6ff730
tree75241c45d7bd93fe8f83da7bf8859025562565d6
parent61774a97ba4dc997d4772d256b59f796090d76ef
Move more code into PasteboardCustomData
https://bugs.webkit.org/show_bug.cgi?id=177795

Reviewed by Wenson Hsieh.

Source/WebCore:

Moved sharedBufferFromCustomData, customDataFromSharedBuffer, and customWebKitPasteboardDataType into
PasteboardCustomData as createSharedBuffer, fromSharedBuffer, and cocoaType respectively.

* platform/Pasteboard.cpp:
(WebCore::PasteboardCustomData::createSharedBuffer const): Renamed from sharedBufferFromCustomData.
(WebCore::PasteboardCustomData::fromSharedBuffer): Renamed from customDataFromSharedBuffer.
* platform/Pasteboard.h:
* platform/StaticPasteboard.cpp:
(WebCore::StaticPasteboard::commitToPasteboard): Now initializes with an empty origin string.
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::PasteboardCustomData::cocoaType): Moved here from Pasteboard.h
(WebCore::Pasteboard::readStringInCustomData):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

Source/WebKit:

Added the support for encoding and decoding the origin string in PasteboardCustomData.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PasteboardCustomData>::encode):
(IPC::ArgumentCoder<PasteboardCustomData>::decode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/Pasteboard.cpp
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/StaticPasteboard.cpp
Source/WebCore/platform/cocoa/PasteboardCocoa.mm
Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
Source/WebCore/platform/ios/WebItemProviderPasteboard.mm
Source/WebCore/platform/mac/PlatformPasteboardMac.mm
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebCoreArgumentCoders.cpp