mParent->IndexOf(this, pos);
mParent->IndexOf(NS_STATIC_CAST(nsIStyledContent*, this), pos);
RDFElementImpl::GetPreviousSibling(nsIDOMNode** aPreviousSibling){    if (nsnull != mParent) {        PRInt32 pos;        mParent->IndexOf(this, pos);        if (pos > -1) {            nsIContent* prev;            mParent->ChildAt(--pos, prev);            if (prev) {                nsresult rv = prev->QueryInterface(kIDOMNodeIID, (void**) aPreviousSibling);                NS_ASSERTION(NS_SUCCEEDED(rv), "not a DOM node");                NS_RELEASE(prev); // balance the AddRef in ChildAt()                return rv;            }        }    }    // XXX Nodes that are just below the document (their parent is the    // document) need to go to the document to find their previous sibling.    *aPreviousSibling = nsnull;    return NS_OK;}