Move layering-violating code from Pasteboard::plainText into Editor (Mac only at...
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 16:47:45 +0000 (16:47 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 16:47:45 +0000 (16:47 +0000)
commit996922a37a4bd39e10980bcdf88153564992db41
tree9b3f119f7287559199ccc880ad6a58ab4a60df77
parent07b3ea0c5cfcf2c157e66b65cc701a49187864ec
Move layering-violating code from Pasteboard::plainText into Editor (Mac only at first)
https://bugs.webkit.org/show_bug.cgi?id=121075

Reviewed by Anders Carlsson.

* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextBypassingDHTML): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainTextWithPasteboard): Use readPlainTextFromPasteboard
for Mac. Also update to take a reference.
(WebCore::Editor::paste): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainText): Ditto.
* editing/Editor.h: Ditto.

* editing/mac/EditorMac.mm:
(WebCore::Editor::readSelectionFromPasteboard): Pass pasteboard as a reference.
(WebCore::Editor::readPlainTextFromPasteboard): Added. The declaration of this
was added (by mistake) in an earlier patch. This has code that used to be inside
Pasteboard::plainText.

* platform/Pasteboard.h: Added PasteboardPlainText. Reorganized functions in the
Pasteboard class and added some FIXMEs. Sorted platforms alphabetically and grouped
functions together and data members separate from them.

* platform/mac/DragDataMac.mm:
(WebCore::DragData::asPlainText): Updated to call readPlainTextFromPasteboard.
(WebCore::DragData::asURL): Tweaked style of unused parameter.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read): Renamed this from plainText, and refactored so that
the data goes out in the PasteboardPlainText structure.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/mac/DragDataMac.mm
Source/WebCore/platform/mac/PasteboardMac.mm