void
nsListBoxBodyFrame::RemoveChildFrame(nsBoxLayoutState &aState,
                                     nsIFrame         *aFrame)
{
  if (!mFrames.ContainsFrame(aFrame)) {
    NS_ERROR("tried to remove a child frame which isn't our child");
    return;
  }

  if (aFrame == GetContentInsertionFrame()) {
    // Don't touch that one
    return;
  }

#ifdef ACCESSIBILITY
  nsAccessibilityService* accService = nsIPresShell::AccService();
  if (accService) {
    nsIContent* content = aFrame->GetContent();
    accService->ContentRemoved(PresContext()->PresShell(), content->GetParent(),
                               content);
  }
#endif

  mFrames.RemoveFrame(aFrame);
  if (mLayoutManager)
    mLayoutManager->ChildrenRemoved(this, aState, aFrame);
  aFrame->Destroy();
}
void
nsListBoxBodyFrame::RemoveChildFrame(nsBoxLayoutState &aState,
                                     nsIFrame         *aFrame)
{
  if (!mFrames.ContainsFrame(aFrame)) {
    NS_ERROR("tried to remove a child frame which isn't our child");
    return;
  }

  if (aFrame == GetContentInsertionFrame()) {
    // Don't touch that one
    return;
  }

  mFrames.RemoveFrame(aFrame);
  if (mLayoutManager)
    mLayoutManager->ChildrenRemoved(this, aState, aFrame);
  aFrame->Destroy();
}