if (childTag.get() == nsXULAtoms::outlinercol && childContent != header) {
if (childTag == nsXULAtoms::outlinercol && childContent != header) {
nsXULOutlinerBuilder::CycleHeader(const PRUnichar* aColID, nsIDOMElement* aElement){    if (mObservers) {        PRUint32 count;        mObservers->Count(&count);        for (PRUint32 i = 0; i < count; ++i) {            nsCOMPtr<nsIXULOutlinerBuilderObserver> observer;            mObservers->QueryElementAt(i, NS_GET_IID(nsIXULOutlinerBuilderObserver), getter_AddRefs(observer));            if (observer)                observer->OnCycleHeader(aColID, aElement);        }    }    nsCOMPtr<nsIContent> header = do_QueryInterface(aElement);    if (! header)        return NS_ERROR_FAILURE;    nsAutoString sort;    header->GetAttr(kNameSpaceID_None, nsXULAtoms::sort, sort);    if (sort.Length()) {        // Grab the new sort variable        mSortVariable = mRules.LookupSymbol(sort.get());        // Cycle the sort direction        nsAutoString dir;        header->GetAttr(kNameSpaceID_None, nsXULAtoms::sortDirection, dir);        if (dir == NS_LITERAL_STRING("ascending")) {            dir = NS_LITERAL_STRING("descending");            mSortDirection = eDirection_Descending;        }        else if (dir == NS_LITERAL_STRING("descending")) {            dir = NS_LITERAL_STRING("natural");            mSortDirection = eDirection_Natural;        }        else {            dir = NS_LITERAL_STRING("ascending");            mSortDirection = eDirection_Ascending;        }        // Sort it        SortSubtree(mRows.GetRoot());        mRows.InvalidateCachedRow();        mBoxObject->Invalidate();        header->SetAttr(kNameSpaceID_None, nsXULAtoms::sortDirection, dir, PR_FALSE);        // Unset sort attribute(s) on the other columns        nsCOMPtr<nsIContent> parentContent;        header->GetParent(*getter_AddRefs(parentContent));        if (parentContent) {            nsCOMPtr<nsIAtom> parentTag;            parentContent->GetTag(*getter_AddRefs(parentTag));            if (parentTag.get() == nsXULAtoms::outliner) {                PRInt32 numChildren;                parentContent->ChildCount(numChildren);                for (int i = 0; i < numChildren; ++i) {                    nsCOMPtr<nsIContent> childContent;                    nsCOMPtr<nsIAtom> childTag;                    parentContent->ChildAt(i, *getter_AddRefs(childContent));                    if (childContent) {                        childContent->GetTag(*getter_AddRefs(childTag));                        if (childTag.get() == nsXULAtoms::outlinercol && childContent != header) {                            childContent->UnsetAttr(kNameSpaceID_None,                                                    nsXULAtoms::sortDirection, PR_FALSE);                        }                    }                }            }        }    }    return NS_OK;}