Comment 15 for bug 295192

Revision history for this message
In , Kmcclusk (kmcclusk) wrote :

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