[Webkit-unassigned] [Bug 27028] [gtk] Pasteboard/GtkClipboard can't handle the "text/html" target.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 7 09:34:03 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27028





--- Comment #5 from Jiahua Huang <jhuangjiahua at gmail.com>  2009-07-07 09:34:03 PDT ---
(In reply to comment #4)
> How about it:

err, no, that is it:

> Index: WebCore/platform/gtk/PasteboardGtk.cpp
> ===================================================================
> --- WebCore/platform/gtk/PasteboardGtk.cpp	(revision 45595)
> +++ WebCore/platform/gtk/PasteboardGtk.cpp	(working copy)
> @@ -108,7 +108,10 @@ void Pasteboard::writeSelection(Range* s
>      PasteboardSelectionData* data = new PasteboardSelectionData(text, markup);
>  
>      gint n_targets;
> -    GtkTargetEntry* targets = gtk_target_table_new_from_list(m_helper->getCopyTargetList(frame), &n_targets);
> +    GtkTargetList* target_list = gtk_target_list_new(NULL, 0);
> +    gtk_target_list_add(target_list, gdk_atom_intern_static_string("text/html"), 0, WEBKIT_WEB_VIEW_TARGET_INFO_HTML);
> +    gtk_target_list_add_text_targets(target_list, WEBKIT_WEB_VIEW_TARGET_INFO_TEXT); 
> +    GtkTargetEntry* targets = gtk_target_table_new_from_list(target_list, &n_targets);      
>      gtk_clipboard_set_with_data(clipboard, targets, n_targets,
>                                  clipboard_get_contents_cb, clipboard_clear_contents_cb, data);
>      gtk_target_table_free(targets, n_targets);

-- 
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