if (*aReturnDetails && newDetails) newDetails->mNext = *aReturnDetails; if (details) *aReturnDetails = details;
nsRangeList::LookUpSelection(nsIContent *aContent, PRInt32 aContentOffset, PRInt32 aContentLength,                             SelectionDetails **aReturnDetails){  if (!aContent || !aReturnDetails)    return NS_ERROR_NULL_POINTER;  STATUS_CHECK_RETURN_MACRO();  *aReturnDetails = nsnull;  PRInt8 j;  for (j = (PRInt8) SELECTION_NORMAL; j < (PRInt8)NUM_SELECTIONTYPES; j++){    if (mDomSelections[j])     mDomSelections[j]->LookUpSelection(aContent, aContentOffset, aContentLength, aReturnDetails, (SelectionType)j);  }  return NS_OK;}