GetClipboardText() calls gtk_clipboard_request_text() to request text clipboard data from Gtk+
and leave Gtk+ to do clipboard text format conversions. Also unify data getting code for text/data/targets.
MozReview-Commit-ID: 9DGSdOACho1
--HG--
extra : rebase_source : f1d95609f8a7587a4abc11739db9d17ec5446a7b
Make the clipboard data getter function more explicitly named and also create a counterpart to release clipboard data.
MozReview-Commit-ID: 3pWsQgCFDuG
--HG--
extra : rebase_source : c4eae554f5a24d998801550ac91b0859ac8e116e
Refactor ncClipboard::GetData() for better readability, add nsClipboard::SetTransferableData()
to send clipboard data to nsITransferable.
According to Gtk people [1] we can't mix free()/g_free() and malloc()/g_malloc() calls.
Existing nsClipboard code mixes that on some places which can lead to issued on glib built
with specific flags (ENABLE_MEM_PROFILE or ENABLE_MEM_CHECK).
[1] https://mail.gnome.org/archives/gtk-list/2000-July/msg00002.html
MozReview-Commit-ID: GvkUGSttVGO
--HG--
extra : rebase_source : 99801e1dc97e24a8d68fe7f3585562bb541c6628