Eliminate Pasteboard::generalPasteboard
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Aug 2013 15:30:01 +0000 (15:30 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Aug 2013 15:30:01 +0000 (15:30 +0000)
commit7fef3ac37b264f601a87bb8e87b63147a9ac4438
treef3949187978c10c512b47e29576f5885c7ccb26d
parent62caa53f894244385debb9a9e4f2c200e0f59152
Eliminate Pasteboard::generalPasteboard
https://bugs.webkit.org/show_bug.cgi?id=120392

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.exp.in: Removed the generalPasteboard function.
It didn't need to be exported, because no one was using it.

* editing/Editor.cpp:
(WebCore::Editor::paste): Added an overload that takes a Pasteboard.
(WebCore::Editor::copyURL): Ditto.
* editing/Editor.h: Added overloads.

* editing/EditorCommand.cpp:
(WebCore::executePasteGlobalSelection): Put this function inside the same
platform #if that the global selection code in the Pasteboard class was in.
Changed to use Pasteboard::createForGlobalSelection instead of using the
Pasteboard::setSelectionMode approach.
(WebCore::createCommandMap): Put PasteGlobalSelection inside the platform #if.

* inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::copyText): Use Pasteboard::createForCopyAndPaste()
instead of Pasteboard::generalPasteboard().
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::copyText): Ditto.

* platform/Pasteboard.h: Removed generalPasteboard. Replaced isSelectionMode
and setSelectionMode with createForGlobalSelection.

* platform/blackberry/PasteboardBlackBerry.cpp: Deleted generalPasteboard.
* platform/efl/PasteboardEfl.cpp: Deleted generalPasteboard.

* platform/gtk/PasteboardGtk.cpp: Deleted selectionClipboard, primaryClipboard,
generalPasteboard, isSelectionMode, and setSelectionMode.
(WebCore::Pasteboard::createForGlobalSelection): Added.
* platform/gtk/PasteboardHelper.cpp: Deleted m_usePrimarySelectionClipboard,
getCurrentClipboard, and getClipboard.
* platform/gtk/PasteboardHelper.h: Deleted the above, plus
setUsePrimarySelectionClipboard and usePrimarySelectionClipboard.

* platform/ios/PasteboardIOS.mm: Deleted generalPasteboard.
* platform/mac/PasteboardMac.mm: Deleted generalPasteboard.

* platform/qt/PasteboardQt.cpp: Deleted generalPasteboard, isSelectionMode,
and setSelectionMode.
(WebCore::Pasteboard::createForGlobalSelection): Added.

* platform/win/PasteboardWin.cpp: Deleted generalPasteboard.

Source/WebKit/qt:

* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::respondToChangedSelection):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::triggerAction):
Use createForGlobalSelection instead of generalPasteboard and setSelectionMode.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::updateGlobalSelection):
Use createForGlobalSelection instead of generalPasteboard and setSelectionMode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/inspector/InjectedScriptHost.cpp
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/blackberry/PasteboardBlackBerry.cpp
Source/WebCore/platform/efl/PasteboardEfl.cpp
Source/WebCore/platform/gtk/PasteboardGtk.cpp
Source/WebCore/platform/gtk/PasteboardHelper.cpp
Source/WebCore/platform/gtk/PasteboardHelper.h
Source/WebCore/platform/ios/PasteboardIOS.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/platform/qt/PasteboardQt.cpp
Source/WebCore/platform/win/PasteboardWin.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp