nsIWebShell* shell = GetTarget(target.GetUnicode()); if (nsnull != shell) { shell->LoadURL(aURLSpec, aPostData); NS_RELEASE(shell);
nsCOMPtr<nsIURI> uri; NS_NewURI(getter_AddRefs(uri), nsDependentString(aURLSpec), nsnull);      if (!uri && NS_SUCCEEDED(EnsureContentListener())) { nsCOMPtr<nsIURIContentListener> listener = do_QueryInterface(mContentListener); nsCAutoString spec; spec.AssignWithConversion(aURLSpec); PRBool abort = PR_FALSE; uri = do_CreateInstance(kSimpleURICID, &rv); NS_ASSERTION(NS_SUCCEEDED(rv), "can't create simple uri"); if (NS_SUCCEEDED(rv)) { rv = uri->SetSpec(spec); NS_ASSERTION(NS_SUCCEEDED(rv), "spec is invalid"); if (NS_SUCCEEDED(rv)) { listener->OnStartURIOpen(uri, &abort); } } return;
nsWebShell::HandleLinkClickEvent(nsIContent *aContent,                                 nsLinkVerb aVerb,                                 const PRUnichar* aURLSpec,                                 const PRUnichar* aTargetSpec,                                 nsIPostData* aPostData){  nsAutoString target(aTargetSpec);  switch(aVerb) {    case eLinkVerb_New:      target.SetString("_blank");      // Fall into replace case    case eLinkVerb_Replace:       {        nsIWebShell* shell = GetTarget(target.GetUnicode());        if (nsnull != shell) {          shell->LoadURL(aURLSpec, aPostData);          NS_RELEASE(shell);        }      }      break;    case eLinkVerb_Embed:    default:      ;      // XXX Need to do this  }}