2008-01-08 Luca Bruno <lethalman88@gmail.com>
authoralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jan 2008 21:34:52 +0000 (21:34 +0000)
committeralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jan 2008 21:34:52 +0000 (21:34 +0000)
        Reviewed by Alp Toker.

        Support copying the selected URL to the clipboard.

        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::Pasteboard::writeURL): implemented

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29318 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/gtk/PasteboardGtk.cpp

index d67049e..fdf3e25 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-08  Luca Bruno  <lethalman88@gmail.com>
+
+        Reviewed by Alp Toker.
+
+        Support copying the selected URL to the clipboard.
+
+        * platform/gtk/PasteboardGtk.cpp:
+        (WebCore::Pasteboard::writeURL): implemented
+
 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
 
         Renamed CharacterData::m_str to m_data
index 0223d03..7395a38 100644 (file)
@@ -114,9 +114,13 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
     gtk_target_table_free(targets, n_targets);
 }
 
-void Pasteboard::writeURL(const KURL&, const String&, Frame*)
+void Pasteboard::writeURL(const KURL& url, const String&, Frame* frame)
 {
-    notImplemented();
+    if (url.isEmpty())
+        return;
+
+    GtkClipboard* clipboard = m_helper->getClipboard(frame);
+    gtk_clipboard_set_text(clipboard, url.string().utf8().data(), url.string().utf8().length());
 }
 
 void Pasteboard::writeImage(Node* node, const KURL&, const String&)