void HandleEvent() { nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell); if (presShell) { #ifdef DEBUG if (VERIFY_REFLOW_NOISY_RC & gVerifyReflowFlags) { printf("\n*** Handling reflow event: PresShell=%p, event=%p\n", (void*)presShell.get(), (void*)this); }
PresShell::HandleEvent(nsIView         *aView, nsGUIEvent*     aEvent, nsEventStatus*  aEventStatus, PRBool          aForceHandle, PRBool&         aHandled) { NS_ASSERTION(aView, "null view"); aHandled = PR_TRUE;  if (mIsDestroying || mIsReflowing) { return NS_OK; }  #ifdef ACCESSIBILITY if (aEvent->eventStructType == NS_ACCESSIBLE_EVENT) { return HandleEventInternal(aEvent, aView, NS_EVENT_FLAG_INIT, aEventStatus); }
  void HandleEvent() {        nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell);    if (presShell) {#ifdef DEBUG      if (VERIFY_REFLOW_NOISY_RC & gVerifyReflowFlags) {         printf("\n*** Handling reflow event: PresShell=%p, event=%p\n", (void*)presShell.get(), (void*)this);      }#endif      // XXX Statically cast the pres shell pointer so that we can call      // protected methods on the pres shell. (the ReflowEvent struct      // is a friend of the PresShell class)      PresShell* ps = NS_REINTERPRET_CAST(PresShell*, presShell.get());      PRBool isBatching;      ps->ClearReflowEventStatus();      ps->GetReflowBatchingStatus(&isBatching);      if (!isBatching) {        nsCOMPtr<nsIViewManager> viewManager;        // Set a kung fu death grip on the view manager associated with the pres shell        // before processing that pres shell's reflow commands.  Fixes bug 54868.        presShell->GetViewManager(getter_AddRefs(viewManager));        ps->ProcessReflowCommands(PR_TRUE);        // Now, explicitly release the pres shell before the view manager        presShell = nsnull;        viewManager = nsnull;      }    }    else      mPresShell = 0;  }