Bug 749527 - Remove text formats in clipboard when copying an image. r=ehsan, a=akeybl
authorBrian R. Bondy <netzen@gmail.com>
Thu, 03 May 2012 20:05:56 -0400
changeset 95622 99726be033d0aa6f31a63546a46702ef8dc527e6
parent 95621 e1551b8eb23c2544384d72b6ecc65fa54a53d86d
child 95623 09cc74b7a248240c2937c6024e1cb1ea102ca7a9
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, akeybl
bugs749527
milestone14.0a2
Bug 749527 - Remove text formats in clipboard when copying an image. r=ehsan, a=akeybl
dom/base/nsGlobalWindowCommands.cpp
--- a/dom/base/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -560,18 +560,18 @@ nsClipboardImageCommands::IsClipboardCom
 
 nsresult
 nsClipboardImageCommands::DoClipboardCommand(const char *aCommandName, nsIContentViewerEdit* aEdit, nsICommandParams* aParams)
 {
   if (!nsCRT::strcmp(sCopyImageLocationString, aCommandName))
     return aEdit->CopyImage(nsIContentViewerEdit::COPY_IMAGE_TEXT);
   if (!nsCRT::strcmp(sCopyImageContentsString, aCommandName))
     return aEdit->CopyImage(nsIContentViewerEdit::COPY_IMAGE_DATA);
-
-  PRInt32 copyFlags = nsIContentViewerEdit::COPY_IMAGE_ALL;
+  PRInt32 copyFlags = nsIContentViewerEdit::COPY_IMAGE_DATA | 
+                      nsIContentViewerEdit::COPY_IMAGE_HTML;
   if (aParams)
     aParams->GetLongValue("imageCopy", &copyFlags);
   return aEdit->CopyImage(copyFlags);
 }
 
 #if 0
 #pragma mark -
 #endif