NS_IF_RELEASE(mCurrentEventContent);
PresShell::ClearFrameRefs(nsIFrame* aFrame){  nsIEventStateManager *manager;  if (NS_SUCCEEDED (mPresContext->GetEventStateManager(&manager))) {    manager->ClearFrameRefs(aFrame);    NS_RELEASE(manager);  }    if (mCaret) {    mCaret->ClearFrameRefs(aFrame);  }    if (aFrame == mCurrentEventFrame) {    mCurrentEventContent = aFrame->GetContent();    NS_IF_ADDREF(mCurrentEventContent);    mCurrentEventFrame = nsnull;  }  for (int i=0; i<mCurrentEventFrameStack.Count(); i++) {    if (aFrame == (nsIFrame*)mCurrentEventFrameStack.ElementAt(i)) {      //One of our stack frames was deleted.  Get its content so that when we      //pop it we can still get its new frame from its content      nsIContent *currentEventContent = aFrame->GetContent();      NS_IF_ADDREF(currentEventContent);      mCurrentEventContentStack.ReplaceElementAt((void*)currentEventContent, i);      mCurrentEventFrameStack.ReplaceElementAt(nsnull, i);    }  }  return NS_OK;}