nsHTMLFrameInnerFrame::ReloadURL()
nsHTMLFrameInnerFrame::ReloadURL(nsIPresContext* aPresContext)
nsHTMLFrameInnerFrame::ReloadURL(){  nsresult rv = NS_OK;  nsIContent* content;  GetParentContent(content);  if (nsnull != content) {    nsAutoString url;    GetURL(content, url);    // load a new url if the size is not 0    if ((mRect.width > 0) && (mRect.height > 0)) {      if (mSubShell) {        mCreatingViewer=PR_TRUE;        // load the document        nsAutoString absURL;        TempMakeAbsURL(content, url, absURL);        nsCOMPtr<nsIURI> uri;        NS_NewURI(getter_AddRefs(uri), absURL.GetUnicode(), nsnull);        // Get the referrer from the currently executing script, if any.        NS_WITH_SERVICE(nsIScriptSecurityManager, secMan,                        NS_SCRIPTSECURITYMANAGER_PROGID, &rv);        if (NS_FAILED(rv))          return rv;        nsCOMPtr<nsIPrincipal> principal;        rv = secMan->GetSubjectPrincipal(getter_AddRefs(principal));        if (NS_FAILED(rv))          return rv;                nsCOMPtr<nsIURI> referrer;        if (principal) {          nsCOMPtr<nsICodebasePrincipal> codebase = do_QueryInterface(principal);          if (codebase) {            rv = codebase->GetURI(getter_AddRefs(referrer));            if (NS_FAILED(rv))              return rv;            nsCOMPtr<nsIURI> newURI;            rv = NS_NewURI(getter_AddRefs(newURI), absURL);                       if (NS_FAILED(rv))              return rv;            rv = secMan->CheckLoadURI(referrer, newURI, PR_FALSE);            if (NS_FAILED(rv))              return rv;          }        }        nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(mSubShell));        NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);        nsCOMPtr<nsIDocShellLoadInfo> loadInfo;        docShell->CreateLoadInfo(getter_AddRefs(loadInfo));        NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE);        loadInfo->SetReferrer(referrer);        rv = docShell->LoadURI(uri, loadInfo);      }    } else {      mCreatingViewer = PR_TRUE;    }    NS_RELEASE(content);  }  return rv;}