[Mac] Move getData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116005

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Added a new boolean argument, forFileDrag,
to the constructor. Maybe we can find a better way to do this once we move
all the platforms over, but this boolean seems a good way to do it for now.
(WebCore::Clipboard::getData): Added. Calls through to Pasteboard after
doing the canReadData check, which is part of DOM rules, not the platform.
Also checks for the file drag case like the old ClipboardMac code did.

* dom/Clipboard.h: Made getData non-virtual in non-legacy case.

* platform/Pasteboard.h: Added a static member function named
absoluteURLsFromPasteboardFilenames, temporary so it can be shared between
ClipboardMac and PasteboardMac. Added a readString public function member,
and a m_changeCount data member. The type of m_changeCount is long since
that can always hold an NSInteger but yet is a type we can compile without
including the header file that defines NSInteger.

* platform/mac/ClipboardMac.h: Removed getData.
* platform/mac/ClipboardMac.mm: Removed getData.
(WebCore::ClipboardMac::ClipboardMac): Added code to pass in the new
forFileDrag boolean.
(WebCore::ClipboardMac::files): Call absoluteURLsFromPasteboardFilenames
as a static member function in Pasteboard since we moved it there.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::Pasteboard): Initialize the change count, so later
pasteboard operations can check it.
(WebCore::Pasteboard::absoluteURLsFromPasteboardFilenames): Added. Moved
here from ClipboardMac.
(WebCore::absoluteURLsFromPasteboard): Ditto.
(WebCore::Pasteboard::readString): Added. Moved here from ClipboardMac.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Move setData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116006

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::setData): Added. Calls through to Pasteboard
after doing checks needed at this level.

* dom/Clipboard.h: Made setData non-virtual in non-legacy case.

* platform/Pasteboard.h: Updated includes and forward declarations.
Removed static member function cocoaTypeFromHTMLClipboardType, since
it can now be private to PasteboardMac. Added static member function
addHTMLClipboardTypesForCocoaType, which is shared between the
ClipboardMac and PasteboardMac files for now. Added writeString.

* platform/mac/ClipboardMac.h: Removed setData.

* platform/mac/ClipboardMac.mm: Removed utiTypeFromCocoaType,
addHTMLClipboardTypesForCocoaType, and setData.
(WebCore::ClipboardMac::types): Call addHTMLClipboardTypesForCocoaType
as a Pasteboard static member function, for now.

* platform/mac/PasteboardMac.mm:
(WebCore::cocoaTypeFromHTMLClipboardType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::readString): Changed to call
cocoaTypeFromHTMLClipboardType as a file-local function, not a member
function (in fact, we didn't need to repeat the class name before, either,
so this is just removing something we didn't need).
(WebCore::utiTypeFromCocoaType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Move types function from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116007

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Added. Calls through to Pasteboard
after doing checks needed at this level.

* dom/Clipboard.h: Made types function non-virtual in non-legacy case,
and removed non-helpful comment.

* platform/Pasteboard.h: Updated includes and comments at the top of
the file a bit. Removed static member function addHTMLClipboardTypesForCocoaType,
since it can now be private to PasteboardMac. Added member function types.

* platform/mac/ClipboardMac.h: Removed types function.
* platform/mac/ClipboardMac.mm: Ditto.

* platform/mac/PasteboardMac.mm:
(WebCore::addHTMLClipboardTypesForCocoaType): Made this a file-local
function instead of a static member function.
(WebCore::Pasteboard::types): Added. Moved from ClipboardMac.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149983 268f45cc-cd09-0410-ab3c-d52691b4dbfc