} else { *aResult = nsnull;
FrameManager::GetPrimaryFrameFor(nsIContent* aContent, nsIFrame** aResult){  NS_ENSURE_ARG_POINTER(aResult);  NS_ENSURE_ARG_POINTER(aContent);  if (!aResult) {    return NS_ERROR_NULL_POINTER;  }  if (mPrimaryFrameMap) {    mPrimaryFrameMap->Search(aContent, 0, (void**)aResult);    if (!*aResult) {      nsCOMPtr<nsIStyleSet>    styleSet;      nsCOMPtr<nsIPresContext> presContext;      // Give the frame construction code the opportunity to return the      // frame that maps the content object      mPresShell->GetStyleSet(getter_AddRefs(styleSet));      mPresShell->GetPresContext(getter_AddRefs(presContext));      styleSet->FindPrimaryFrameFor(presContext, this, aContent, aResult);    }  } else {    *aResult = nsnull;  }    return NS_OK;}