The problem is the DeviceContext held by the presentation context is not updated when the depth changes.
See ScreenImpl::GetDeviceContext
nsIDeviceContext* ScreenImpl::GetDeviceContext() {
if(!mDocShell) return nsnull;
nsCOMPtr<nsIContentViewer> contentViewer; mDocShell->GetContentViewer(getter_AddRefs(contentViewer));
nsCOMPtr<nsIDocumentViewer> docViewer(do_QueryInterface(contentViewer)); if(!docViewer) return nsnull;
nsCOMPtr<nsIPresContext> presContext; docViewer->GetPresContext(*getter_AddRefs(presContext));
nsIDeviceContext* context = nsnull; if(presContext) presContext->GetDeviceContext(&context);
return context; }
Reassigning to myself
The problem is the DeviceContext held by the presentation context is not updated
when the depth changes.
See ScreenImpl: :GetDeviceConte xt
nsIDeviceContext* ScreenImpl: :GetDeviceConte xt()
{
if(!mDocShell)
return nsnull;
nsCOMPtr< nsIContentViewe r> contentViewer; >GetContentView er(getter_ AddRefs( contentViewer) );
mDocShell-
nsCOMPtr< nsIDocumentView er> docViewer( do_QueryInterfa ce(contentViewe r));
if(!docViewer)
return nsnull;
nsCOMPtr< nsIPresContext> presContext; >GetPresContext (*getter_ AddRefs( presContext) );
docViewer-
nsIDeviceContext* context = nsnull; xt->GetDeviceCo ntext(& context) ;
if(presContext)
presConte
return context;
}
Reassigning to myself