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 19:49:24 -0400
changeset 92166 4ed2dffc85cd0396f3bea94431068c9a7f602b93
parent 92165 cd63f8fbc4e6c14bad6713c07e4fbd35e80f23ac
child 92167 517b484c48e0a1365e62705a91f2385bf38a061c
push idunknown
push userunknown
push dateunknown
reviewersehsan, akeybl
bugs749527
milestone13.0
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