nsCOMPtr<nsIDOMCharacterData> cData(do_QueryInterface(aContent));  if (cData) {    nsCOMPtr<nsIContent> startContent(do_QueryInterface(aStartNode)); nsCOMPtr<nsIContent> endContent(do_QueryInterface(aEndNode));  if (aContent == startContent || aContent == endContent) return PR_TRUE; }
ContentIsInTraversalRange(nsIContent *aContent,   PRBool aIsPreMode,                          nsIDOMNode *aStartNode, PRInt32 aStartOffset,                          nsIDOMNode *aEndNode,   PRInt32 aEndOffset){  if (!aStartNode || !aEndNode || !aContent)    return PR_FALSE;  nsCOMPtr<nsIDOMNode> parentNode;  PRInt32 indx = 0;  ContentToParentOffset(aContent, getter_AddRefs(parentNode), &indx);  if (!parentNode)    return PR_FALSE;  if (!aIsPreMode)    ++indx;  return (ComparePoints(aStartNode, aStartOffset, parentNode, indx) <= 0) &&         (ComparePoints(aEndNode,   aEndOffset,   parentNode, indx) >= 0);}