Boris Zbarsky wrote:
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?

OK, this is in fact happening in an insane way. We're messing with a kid of the popup, which marks things dirty up to the reflow root or frame tree root. The parent of the popup is the same as the parent of its placeholder, so we just mark things dirty up to the viewport. But reflowing the viewport does NOT reflow the popup. The only way to get the popup to reflow is to either reflow it directly (as a reflow root), or to reflow the popup set. This used to be handled by nsMenuPopupFrame::RelayoutDirtyChild calling up to the popupset, but that code is now gone.

Setting the popup as a reflow root causes asserts in nsHTMLReflowState, since it's an unknown type of out-of-flow. So I think the right thing to do is to either set the popupset as the GetParent() of the menupopup and having the popupset be a reflow root or to make the menupopup a reflow root and fix the reflow state to deal (or both!).

Anyone see any obvious issues with the GetParent() change? It should be less invasive, since it keeps popups reflowing as XUL boxes...

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

Reply via email to