CompleteScroll(aForward);
PresShell::CompleteMove(PRBool aForward, PRBool aExtend){  nsCOMPtr<nsIDocument> document;  if (NS_FAILED(GetDocument(getter_AddRefs(document))) || !document)    return NS_ERROR_FAILURE;    nsCOMPtr<nsIDOMNodeList>nodeList;   nsAutoString bodyTag; bodyTag.AssignWithConversion("body");   nsCOMPtr<nsIDOMDocument> doc = do_QueryInterface(document);  if (!doc)     return NS_ERROR_FAILURE;  nsresult result = doc->GetElementsByTagName(bodyTag, getter_AddRefs(nodeList));  if (NS_FAILED(result) || !nodeList)    return result?result:NS_ERROR_NULL_POINTER;  PRUint32 count;   nodeList->GetLength(&count);  if (count < 1)    return NS_ERROR_FAILURE;  // Use the first body node in the list:  nsCOMPtr<nsIDOMNode> node;  result = nodeList->Item(0, getter_AddRefs(node));   if (NS_SUCCEEDED(result) && node)  {    //return node->QueryInterface(NS_GET_IID(nsIDOMElement), (void **)aBodyElement);    // Is above equivalent to this:    nsCOMPtr<nsIDOMElement> bodyElement = do_QueryInterface(node);    if (bodyElement)    {      nsCOMPtr<nsIContent> bodyContent = do_QueryInterface(bodyElement);      if (bodyContent)      {        PRInt32 offset = 0;        if (aForward)        {          bodyContent->ChildCount(offset);        }        result = mSelection->HandleClick(bodyContent,offset,offset,aExtend, PR_FALSE,aExtend);      }    }  }  return result;}