result = content->ChildAt(startOffset, *getter_AddRefs(child));
result = content->ChildAt(startOffset, getter_AddRefs(child));
nsTypedSelection::getTableCellLocationFromRange(nsIDOMRange *aRange, PRInt32 *aSelectionType, PRInt32 *aRow, PRInt32 *aCol){  if (!aRange || !aSelectionType || !aRow || !aCol)    return NS_ERROR_NULL_POINTER;  *aSelectionType = nsISelectionPrivate::TABLESELECTION_NONE;  *aRow = 0;  *aCol = 0;  // Must have access to frame selection to get cell info  if (!mFrameSelection) return NS_OK;  nsresult result = GetTableSelectionType(aRange, aSelectionType);  if (NS_FAILED(result)) return result;    // Don't fail if range does not point to a single table cell,  //  let aSelectionType tell user if we don't have a cell  if (*aSelectionType  != nsISelectionPrivate::TABLESELECTION_CELL)    return NS_OK;  // Get the child content (the cell) pointed to by starting node of range  // We do minimal checking since GetTableSelectionType assures  //   us that this really is a table cell  nsCOMPtr<nsIDOMNode> startNode;  result = aRange->GetStartContainer(getter_AddRefs(startNode));  if (NS_FAILED(result)) return result;  nsCOMPtr<nsIContent> content(do_QueryInterface(startNode));  if (!content) return NS_ERROR_FAILURE;  PRInt32 startOffset;  result = aRange->GetStartOffset(&startOffset);  if (NS_FAILED(result)) return result;  nsCOMPtr<nsIContent> child;  result = content->ChildAt(startOffset, *getter_AddRefs(child));  if (NS_FAILED(result)) return result;  if (!child) return NS_ERROR_FAILURE;  //Note: This is a non-ref-counted pointer to the frame  nsITableCellLayout *cellLayout = mFrameSelection->GetCellLayout(child);  if (NS_FAILED(result)) return result;  if (!cellLayout) return NS_ERROR_FAILURE;    return cellLayout->GetCellIndexes(*aRow, *aCol);}