[Webkit-unassigned] [Bug 27028] [gtk] Pasteboard/GtkClipboard can't handle the "text/html" target.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 10 05:56:30 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27028
--- Comment #8 from Jiahua Huang <jhuangjiahua at gmail.com> 2009-07-10 05:56:30 PDT ---
(In reply to comment #6)
> I think a proper fix for this is to add a function in
> WebKit/gtk/WebCoreSuppoer/PasteboardHelperGtk.cpp that will return the value of
> WEBKIT_WEB_VIEW_TARGET_INFO_HTML, and use that in clipboard_get_contents_cb.
I agree.
How about it:
> Index: WebCore/platform/gtk/PasteboardGtk.cpp
> ===================================================================
> --- WebCore/platform/gtk/PasteboardGtk.cpp (revision 45658)
> +++ WebCore/platform/gtk/PasteboardGtk.cpp (working copy)
> @@ -35,13 +35,6 @@
>
> namespace WebCore {
>
> -/* FIXME: we must get rid of this and use the enum in webkitwebview.h someway */
> -typedef enum
> -{
> - WEBKIT_WEB_VIEW_TARGET_INFO_HTML = - 1,
> - WEBKIT_WEB_VIEW_TARGET_INFO_TEXT = - 2
> -} WebKitWebViewTargetInfo;
> -
> class PasteboardSelectionData {
> public:
> PasteboardSelectionData(gchar* text, gchar* markup)
> @@ -65,7 +58,7 @@ static void clipboard_get_contents_cb(Gt
> guint info, gpointer data) {
> PasteboardSelectionData* clipboardData = reinterpret_cast<PasteboardSelectionData*>(data);
> ASSERT(clipboardData);
> - if ((gint)info == WEBKIT_WEB_VIEW_TARGET_INFO_HTML) {
> + if ((gint)info == m_helper->PasteboardHelperGtk()) {
> gtk_selection_data_set(selection_data, selection_data->target, 8,
> reinterpret_cast<const guchar*>(clipboardData->markup()),
> g_utf8_strlen(clipboardData->markup(), -1));
> Index: WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
> ===================================================================
> --- WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp (revision 45658)
> +++ WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp (working copy)
> @@ -67,4 +67,14 @@ GtkTargetList* PasteboardHelperGtk::getP
> return webkit_web_view_get_paste_target_list(webView);
> }
>
> +gint PasteboardHelperGtk::getWebViewTargetInfoHtml() const
> +{
> + return WEBKIT_WEB_VIEW_TARGET_INFO_HTML;
> +}
> +
> +gint PasteboardHelperGtk::getWebViewTargetInfoText() const
> +{
> + return WEBKIT_WEB_VIEW_TARGET_INFO_TEXT;
> +}
> +
> }
I'm waiting for the rebuild process to complete.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list