It is the right place to do it, otherwise we don't have the guarantee of
it invalidating ancestor sizes or anything.
It's also what we invalidate in WaylandPopupPropagateChangesToLayout().
We otherwise do not have the guarantee of SetPopupPosition running
before or after layout, if sizes do not change. That caused the popup
size to remain big, which caused a resize loop.
Differential Revision: https://phabricator.services.mozilla.com/D144314