nsIFrame* child = nsFrameNavigator::GetChildBeforeAfter(splitter,before); if (child == nsnull)
} else { mState = newState;
nsSplitterFrameImpl::UpdateState(){  State newState = GetState();   if (newState == mState)	  return;   nsString style;  if (mState == Collapsed) {    style = mCollapsedChildStyle;  } else {    // when clicked see if we are in a splitter.     nsIFrame* splitter = mSplitter;    // get the splitters content node    nsCOMPtr<nsIContent> content;    splitter->GetContent(getter_AddRefs(content));    // get the collapse attribute. If the attribute is not set collapse    // the child before otherwise collapse the child after    PRBool before = PR_TRUE;    nsString value;    if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, nsXULAtoms::collapse, value))    {     if (value.EqualsIgnoreCase("before"))         before = PR_TRUE;     else if (value.EqualsIgnoreCase("after"))         before = PR_FALSE;     else        return;    } else {        return;    }    // find the child just in the box just before the splitter. If we are not currently collapsed then    // then get the childs style attribute and store it. Then set the child style attribute to be display none.    // if we are already collapsed then set the child's style back to our stored value.    nsIFrame* child = nsFrameNavigator::GetChildBeforeAfter(splitter,before);    if (child == nsnull)      return;    child->GetContent(getter_AddRefs(mCollapsedChild));    style = "visibility: collapse";    mCollapsedChildStyle = "";    mCollapsedChild->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::style, mCollapsedChildStyle);  }  mCollapsedChild->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::style, style, PR_TRUE);  mState = newState;}