Closed Bug 909687 Opened 11 years ago Closed 11 years ago

Choosing between PrintWithParent and Print calls in nsMsgPrintEngine::PrintMsgWindow has no effect

Categories

(MailNews Core :: Printing, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 26.0

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

Attached patch The fixSplinter Review
In nsMsgPrintEngine::PrintMsgWindow we are currently doing:

nsCOMPtr<nsIContentViewerFile> contentViewerFile(do_QueryInterface(mWebBrowserPrint));
if (contentViewerFile && mParentWindow) 
{
  rv = contentViewerFile->PrintWithParent(mParentWindow, mPrintSettings, (nsIWebProgressListener *)this);
} 
else 
{
  rv = mWebBrowserPrint->Print(mPrintSettings, (nsIWebProgressListener *)this);
}

However, if you trace the PrintWithParent call through, it calls Print on the mWebBrowserPrint object with exactly the same arguments as it is called here.

Therefore we can just drop this QI and selection. As a side-effect, nsIContentViewerFile will be able to drop PrintWithParent, as this is the last usage of it (I'll file a separate bug for that once this lands).
Attachment #795914 - Flags: review?(neil)
Comment on attachment 795914 [details] [diff] [review]
The fix

Seems reasonable to me.
Attachment #795914 - Flags: review?(neil) → review+
https://hg.mozilla.org/comm-central/rev/3a2dda75f8bd
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 26.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: