Bug 349754 - HTMLTransfer does'nt work on GTK/WebKit
Summary: HTMLTransfer does'nt work on GTK/WebKit
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Deadline: 2018-02-07
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo, triaged
Depends on:
Blocks:
 
Reported: 2011-06-18 12:55 EDT by Hiromasa Tanaka CLA
Modified: 2018-11-30 15:01 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiromasa Tanaka CLA 2011-06-18 12:55:32 EDT
Clipboard data(text/html) that was copied from WebKit can't get on org.eclipse.swt.dnd.HTMLTransfer class.

Best regards.

---
example(1byte paste from browser):

*Chromium browser (length is invalid)

org.eclipse.swt.dnd.Clipboard line 317
"gtkSelectionData"
	sizeof	28	
	data	176788624	
	format	8	
	length	853	
	selection	69	
	target	120	

*Firefox 4.0.1 (good work)

org.eclipse.swt.dnd.Clipboard line 317
"gtkSelectionData"	 (id=127)	
	sizeof	28	
	data	164269320	
	format	8	
	length	4	
	selection	69	
	target	120	

Source is:

Display display = new Display();
Clipboard clipboard = new Clipboard(display);
HTMLTransfer transfer = HTMLTransfer.getInstance();
System.out.println(clipboard.getContents(transfer));

System is:

SWT 3.7 Milestone 7 
Ubuntu 11.04(2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux)

$ dpkg -l | grep webkit
ii  libwebkitgtk-1.0-0                    1.3.13-0ubuntu2                            Web content engine library for Gtk+
ii  libwebkitgtk-1.0-common               1.3.13-0ubuntu2                            Web content engine library for Gtk+ - data files
ii  libwebkitgtk-3.0-0                    1.3.13-0ubuntu2                            Web content engine library for Gtk+
ii  libwebkitgtk-3.0-common               1.3.13-0ubuntu2                            Web content engine library for Gtk+

$ dpkg -l | grep chromium
ii  chromium-browser                      12.0.742.91~r87961-0ubuntu0.11.04.1        Chromium browser
ii  chromium-browser-inspector            12.0.742.91~r87961-0ubuntu0.11.04.1        page inspector for the chromium-browser - transitional package
ii  chromium-browser-l10n                 12.0.742.91~r87961-0ubuntu0.11.04.1        chromium-browser language packages
ii  chromium-codecs-ffmpeg                12.0.742.91~r87961-0ubuntu0.11.04.1        Free ffmpeg codecs for the Chromium Browser

$ dpkg -l | grep firefox
ii  firefox                               4.0.1+build1+nobinonly-0ubuntu0.11.04.3    Safe and easy web browser from Mozilla
ii  firefox-globalmenu                    4.0.1+build1+nobinonly-0ubuntu0.11.04.3    Unity appmenu integration for Firefox
ii  firefox-gnome-support                 4.0.1+build1+nobinonly-0ubuntu0.11.04.3    Safe and easy web browser from Mozilla - GNOME support
Comment 1 Abel Pascual CLA 2012-02-27 08:25:24 EST
Same behaviour here,

Using HTMLTransfer to paste HTML code copied from Chromium to an application returns illegible code.

Cheers.
Comment 2 Leo Ufimtsev CLA 2018-01-30 10:24:03 EST
In the meantime webkit2 support was released.

See 4.8 M5.

Could you try with 4.8 M5 and webkit2?

See this guy for info:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=509587

If issue still occurs, can you please post a snippet and steps to reproduce so that I can test this.
Comment 3 Eric Williams CLA 2018-11-30 15:01:31 EST
(In reply to Leo Ufimtsev from comment #2)
> In the meantime webkit2 support was released.
> 
> See 4.8 M5.
> 
> Could you try with 4.8 M5 and webkit2?
> 
> See this guy for info:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=509587
> 
> If issue still occurs, can you please post a snippet and steps to reproduce
> so that I can test this.

No response since this comment, closing this ticket now. Please re-open it if the issue is reproducible on 4.9/4.10 with up-to-date GTK3 and Webkit2.