summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webclipboard_impl.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:04:59 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:04:59 +0000
commit9c8574e82b0371650ebb55237ef94a3630587703 (patch)
tree651a6cea9e6d6c4d9195bb3ea0ad3c1998cc8507 /webkit/glue/webclipboard_impl.cc
parent84d33e6b9a3a5369859efc1365b275049a80c6ab (diff)
downloadchromium_src-9c8574e82b0371650ebb55237ef94a3630587703.zip
chromium_src-9c8574e82b0371650ebb55237ef94a3630587703.tar.gz
chromium_src-9c8574e82b0371650ebb55237ef94a3630587703.tar.bz2
Only write the image when writeImage is called. We don't write the
other formats because when pasting, we want to make sure the image has priority. This method appears to only be called from the image context menu and when viewing an image only in a tab and using copy (ctrl+c or from the page menu). In both of these cases, if the user wants the URL, they can use the context menu "copy image url" to get the URL. BUG=21593 Review URL: http://codereview.chromium.org/254006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webclipboard_impl.cc')
-rw-r--r--webkit/glue/webclipboard_impl.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index d9aed7a..0341079 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -156,11 +156,8 @@ void WebClipboardImpl::writeImage(
scw.WriteBitmapFromPixels(bitmap.getPixels(), image.size());
}
- if (!url.isEmpty()) {
- scw.WriteBookmark(title, url.spec());
- scw.WriteHTML(UTF8ToUTF16(URLToImageMarkup(url, title)), "");
- scw.WriteText(UTF8ToUTF16(url.spec()));
- }
+ // We intentionally only write the image. If the user wants the URL, they
+ // can get that from the context menu.
}
bool WebClipboardImpl::ConvertBufferType(Buffer buffer,