Bug 433727. Make DocumentViewerImpl::GetFullZoom work when there's no presentation. r+sr=bzbarsky,a=beltzner

This commit is contained in:
roc+@cs.cmu.edu 2008-05-26 15:03:11 -07:00
parent 8b264731f0
commit 2347a6f10e

View File

@ -2714,8 +2714,10 @@ NS_IMETHODIMP
DocumentViewerImpl::GetFullZoom(float* aFullZoom)
{
NS_ENSURE_ARG_POINTER(aFullZoom);
// Check the prescontext first because it might have a temporary
// setting for print-preview
nsPresContext* pc = GetPresContext();
*aFullZoom = pc ? pc->GetFullZoom() : 1.0f;
*aFullZoom = pc ? pc->GetFullZoom() : mPageZoom;
return NS_OK;
}