if (!mPresShellWeak) return NS_ERROR_NOT_INITIALIZED; nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShellWeak); if (presShell) { nsCOMPtr<nsIPresContext> context; if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context) { return mFrameSelection->RepaintSelection(context, type); } } return NS_ERROR_FAILURE;
return RepaintSelection(aSelectionType);
nsTextInputSelectionImpl::RepaintSelection(PRInt16 type){  if (!mPresShellWeak) return NS_ERROR_NOT_INITIALIZED;  nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShellWeak);  if (presShell)  {    nsCOMPtr<nsIPresContext> context;    if (NS_SUCCEEDED(presShell->GetPresContext(getter_AddRefs(context))) && context)    {      return mFrameSelection->RepaintSelection(context, type);    }  }  return NS_ERROR_FAILURE;}