nsITreeFrame* treeFrame = (nsITreeFrame*)frame;
nsCOMPtr<nsITreeFrame> treeFrame(do_QueryInterface(frame));
NS_IMETHODIMP nsTreeBoxObject::GetPreviousItem(nsIDOMElement *aStartItem, PRInt32 aDelta, nsIDOMElement **aResult){  nsIFrame* frame = GetFrame();  if (!frame)    return NS_OK;  nsITreeFrame* treeFrame = (nsITreeFrame*)frame;  return treeFrame->GetPreviousItem(aStartItem, aDelta, aResult);}