Last Comment Bug 737688 - nsMailboxUrl should treat fetch-part URLs as "eDisplay"
: nsMailboxUrl should treat fetch-part URLs as "eDisplay"
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Attachments (show other bugs)
: 11
: x86_64 Linux
: -- normal (vote)
: Thunderbird 14.0
Assigned To: Jim Porter (:squib)
:
Mentors:
Depends on:
Blocks: 736798
  Show dependency treegraph
 
Reported: 2012-03-20 16:26 PDT by Jim Porter (:squib)
Modified: 2012-04-08 19:01 PDT (History)
1 user (show)
squibblyflabbetydoo: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix this (3.50 KB, patch)
2012-03-20 16:26 PDT, Jim Porter (:squib)
mozilla: review-
Details | Diff | Review
Make nsMailboxUrl behave more like nsImapUrl (4.52 KB, patch)
2012-03-21 23:53 PDT, Jim Porter (:squib)
mozilla: review+
Details | Diff | Review

Description Jim Porter (:squib) 2012-03-20 16:26:59 PDT
Created attachment 607767 [details] [diff] [review]
Fix this

Currently, opening an attached message from a local message doesn't fire onEndMsgDownload, which causes a few problems:

* The phishing detector is never run
* Big images aren't resized to fit the screen
* Mozmill tests can't use wait_for_message_display_completion

Here's a patch to fix this, which also adds a Mozmill test for the phishing detector.
Comment 1 David :Bienvenu 2012-03-21 13:18:38 PDT
Comment on attachment 607767 [details] [diff] [review]
Fix this

what if we're fetching a non attached message part, i.e., any other kind of attachment? Maybe we should check the content type as well (message/rfc822)

-      *isType = (m_mailboxAction == nsIMailboxUrl::ActionFetchMessage);
+      *isType = (m_mailboxAction == nsIMailboxUrl::ActionFetchMessage ||
+                 m_mailboxAction == nsIMailboxUrl::ActionFetchPart);
Comment 2 David :Bienvenu 2012-03-21 13:32:54 PDT
Comment on attachment 607767 [details] [diff] [review]
Fix this

yeah, opening an attached jpg in a local mail message triggers the nsMsgStatusFeedback::OnStateChange code, which I don't think is the right thing.
Comment 3 Jim Porter (:squib) 2012-03-21 20:15:27 PDT
(In reply to David :Bienvenu from comment #2)
> Comment on attachment 607767 [details] [diff] [review]
> Fix this
> 
> yeah, opening an attached jpg in a local mail message triggers the
> nsMsgStatusFeedback::OnStateChange code, which I don't think is the right
> thing.

It looks like this happens with nsImapUrls too, but that they don't have a msgWindow set in that case, so we never get to OnEndMsgDownload.
Comment 4 Jim Porter (:squib) 2012-03-21 23:53:11 PDT
Created attachment 608241 [details] [diff] [review]
Make nsMailboxUrl behave more like nsImapUrl

Based on my debug printf()s, I think this makes mailbox URLs work like IMAP URLs, which seems like a good goal.

Here's a try build to ensure I didn't totally break things: http://build.mozillamessaging.com/tinderboxpushlog/?tree=ThunderbirdTry&rev=6138e7d5e0bb
Comment 5 Jim Porter (:squib) 2012-04-08 19:01:27 PDT
Checked in: http://hg.mozilla.org/comm-central/rev/104c0b09c833

Note You need to log in before you can comment on or make changes to this bug.