Bug 1358565 - don't prioritise text part when saving attachment. r=aceman a=jorgk
authorJorg K <jorgk@jorgk.com>
Mon, 24 Apr 2017 08:37:33 +0200
changeset 27814 2a43cb0bf95314a7cb7ce384fa88f1dd0b6b49a1
parent 27813 0292cd5151ac03ae9415ff7af281fb90c59b11a1
child 27815 01b588e5e9de4499a2484651caf8f688e4b5122e
push id1924
push usermozilla@jorgk.com
push dateTue, 25 Apr 2017 09:02:43 +0000
treeherdercomm-beta@75634f13d8d7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman, jorgk
bugs1358565
Bug 1358565 - don't prioritise text part when saving attachment. r=aceman a=jorgk
mailnews/mime/src/mimemalt.cpp
--- a/mailnews/mime/src/mimemalt.cpp
+++ b/mailnews/mime/src/mimemalt.cpp
@@ -385,18 +385,19 @@ MimeMultipartAlternative_display_part_p(
   if (clazz && clazz->displayable_inline_p(clazz, sub_hdrs)) {
     // prefer_plaintext pref
     bool prefer_plaintext = false;
     nsIPrefBranch *prefBranch = GetPrefBranch(self->options);
     if (prefBranch) {
       prefBranch->GetBoolPref("mailnews.display.prefer_plaintext",
                               &prefer_plaintext);
     }
-    prefer_plaintext = prefer_plaintext
-           && (self->options->format_out != nsMimeOutput::nsMimeMessageSaveAs);
+    prefer_plaintext = prefer_plaintext &&
+           (self->options->format_out != nsMimeOutput::nsMimeMessageSaveAs) &&
+           (self->options->format_out != nsMimeOutput::nsMimeMessageRaw);
 
     priority = MimeMultipartAlternative_prioritize_part(ct, prefer_plaintext);
   }
 
   PR_FREEIF(ct);
   return priority;
 }