2009-08-14  Jiahua Huang  <jhuangjiahua@gmail.com>

        Reviewed by Jan Alonzo.

        [gtk] Pasteboard/GtkClipboard can't handle the "text/html" target.
        https://bugs.webkit.org/show_bug.cgi?id=27028

        Remove the improper set of enum WebKitWebViewTargetInfo
        by grabbing the target infos via m_helper.

        * manual-tests/gtk/copy-htmltext.html: Added.
        * platform/Pasteboard.h:
        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::clipboard_get_contents_cb):
        * platform/gtk/PasteboardHelper.h:

        Add a function in WebKit::PasteboardHelperGtk that will return the
        value of WEBKIT_WEB_VIEW_TARGET_INFO_HTML,
        and WebCore::clipboard_get_contents_cb will use that.

        * WebCoreSupport/PasteboardHelperGtk.cpp:
        (WebKit::PasteboardHelperGtk::getWebViewTargetInfoHtml):
        * WebCoreSupport/PasteboardHelperGtk.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/manual-tests/gtk/copy-htmltext.html b/WebCore/manual-tests/gtk/copy-htmltext.html
new file mode 100644
index 0000000..0b811f6
--- /dev/null
+++ b/WebCore/manual-tests/gtk/copy-htmltext.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <title>Copy HTML content</title>
+    </head>
+    <body>
+        <h1>Copy HTML content from currently editable area</h1>
+        <div title="EditableArea" contentEditable="true" 
+            style="display: block; border: 2px solid black; margin: 5px; padding: 15px;">
+            Here is a Editable Area,<br />
+            <img title="It's the test image" src="http://webkit.org/images/icon-gold.png" /><br /><br />
+            <b>STEPS TO TEST:</b><br />
+            <ol>
+                <li>Select all that text or picture in this editable area (type <b>Ctrl-A</b> / Option-A)</li>
+                <li><b>Copy</b> them use <b>Ctrl-C</b> / Option-C</li>
+                <li>Move the cursor to a blank line below</li>
+                <li>Paste them use <b>Ctrl-V</b> / Option-V</li>
+            </ol>
+            <p><b>Ensure</b> that text and image has been pasted with formats and no garbled.</p>
+            <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br />
+        </div>       
+    </body>
+</html>