DocumentViewerImpl::Open(nsISupports *aState)
DocumentViewerImpl::Open()
DocumentViewerImpl::Open(nsISupports *aState){  NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_INITIALIZED);  // Our container might have gone away while we were closed.  // If this is the case, we must fail to open so we don't crash.  nsCOMPtr<nsISupports> container = do_QueryReferent(mContainer);  if (!container)    return NS_ERROR_NOT_AVAILABLE;  nsRect bounds;  mWindow->GetBounds(bounds);  nsresult rv = InitInternal(mParentWidget, aState, mDeviceContext, bounds,                             PR_FALSE, PR_FALSE);  NS_ENSURE_SUCCESS(rv, rv);  if (mDocument)    mDocument->SetContainer(nsCOMPtr<nsISupports>(do_QueryReferent(mContainer)));  SyncParentSubDocMap();  // XXX re-enable image animations once that works correctly  PrepareToStartLoad();  return NS_OK;}