So I was poking around at why submenus of XUL context menus don't appear on reflow branch (see attached testcase).

It looks like when we call PresShell::FrameNeedsReflow() on the menupopup, we bail out early because the nsMenuFrame has NS_FRAME_HAS_DIRTY_CHILDREN set. But mDirtyRoots is empty, so the following flush doesn't have any effect. The code in nsMenuFrame where this is happening is:

      if (!wasOpen)
      {
         menuPopup->AddStateBits(NS_FRAME_IS_DIRTY);
         presContext->PresShell()->
           FrameNeedsReflow(menuPopup, nsIPresShell::eStyleChange);
         presContext->PresShell()->FlushPendingNotifications(Flush_OnlyReflow);
      }

in nsMenuFrame::OpenMenuInternal, and we have NS_FRAME_HAS_DIRTY_CHILDREN set when we enter that function....

It seems odd to me that we can have a frame with NS_FRAME_HAS_DIRTY_CHILDREN set while mDirtyRoots is empty and we're not in the middle of reflow. Or can this happen in some sane way?

-Boris
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to