Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: webkit/glue/webclipboard_impl.cc

Issue 7044074: Don't write image markup to the clipboard when copying images on OS X. (Closed)
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webclipboard_impl.cc
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index 10dddab7ddc4adc02dd59cf252ee0ef1611066fa..875c6e4c6b1fed03218408f3afedb76b3fdb26db 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -179,13 +179,17 @@ void WebClipboardImpl::writeImage(
scw.WriteBitmapFromPixels(bitmap.getPixels(), image.size());
}
- // When writing the image, we also write the image markup so that pasting
- // into rich text editors, such as Gmail, reveals the image. We also don't
- // want to call writeText(), since some applications (WordPad) don't pick the
- // image if there is also a text format on the clipboard.
if (!url.isEmpty()) {
scw.WriteBookmark(title, url.spec());
+#if !defined(OS_MACOSX)
+ // When writing the image, we also write the image markup so that pasting
+ // into rich text editors, such as Gmail, reveals the image. We also don't
+ // want to call writeText(), since some applications (WordPad) don't pick
+ // the image if there is also a text format on the clipboard.
+ // We also don't want to write HTML on a Mac, since Mail.app prefers to use
+ // the image markup over attaching the actual image.
Nico 2011/06/09 16:11:38 nit: Maybe add "See http://crbug.com/33016"
scw.WriteHTML(UTF8ToUTF16(URLToImageMarkup(url, title)), "");
+#endif
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698