nsCOMPtr<nsIAtom> tag;
nsIAtom *tag;
GetCellParent(nsIDOMNode *aDomNode){    if (!aDomNode)      return 0;    nsCOMPtr<nsIDOMNode> parent(aDomNode);    nsCOMPtr<nsIDOMNode> current(aDomNode);    PRInt32 childOffset;    nsCOMPtr<nsIAtom> tag;    // Start with current node and look for a table cell    while(current)    {      tag = GetTag(current);      if (tag == nsHTMLAtoms::td)        return current;      if (NS_FAILED(ParentOffset(current,getter_AddRefs(parent),&childOffset)) || !parent)        return 0;      current = parent;    }    return 0;}