REGRESSION (r109022) Safari not placing service data on pasteboard.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Apr 2012 00:25:55 +0000 (00:25 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Apr 2012 00:25:55 +0000 (00:25 +0000)
commitef7cfab330064523f442dfa01a525cf0d1fb9e2c
treec0eb42cd5b3e7d4a094a22725479924976f3b739
parente530e35d22a4f7105d8025cfe38f767a55c7cd27
REGRESSION (r109022) Safari not placing service data on pasteboard.
https://bugs.webkit.org/show_bug.cgi?id=84766
<rdar://problem/11085756>

The support for OS X services requires that the write operations to
the pasteboard occur synchronously. This behavior was changed with r109022.
This change removes the original synchronous call to the WebProcess to perform
the pasteboard write that had become asynchronous after r109022.
It implements instead a synchronous call to retrive the content to be placed
in the pasteboard.

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* WebCore.exp.in:
* editing/Editor.h:
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeSelectionToPasteboard):
(WebCore::Editor::stringSelectionForPasteboard): Added.
(WebCore::Editor::dataSelectionForPasteboard): Added.
* platform/Pasteboard.h:
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::getStringSelection): Added.
(WebCore::Pasteboard::getDataSelection): Added.
(WebCore::Pasteboard::writeSelectionForTypes):
(WebCore::Pasteboard::writeSelection):

Source/WebKit2:

* UIProcess/API/mac/WKView.mm:
(-[WKView writeSelectionToPasteboard:types:]): Uses new methods.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm: Removed writeSelectionToPasteboard.
(WebKit::WebPageProxy::getStringSelectionForPasteboard): Added.
(WebKit::WebPageProxy::getBufferSelectionForPasteboard): Added.
* WebProcess/WebPage/WebPage.h: Added support for the new messages and
removed old message.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
* WebProcess/WebPage/mac/WebPageMac.mm: Ditto.
(WebKit::WebPage::readSelectionFromPasteboard): Added.
(WebKit::WebPage::getBufferSelectionForPasteboard): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/editing/Editor.h
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm