[x11] XULPopupElement::GetOuterScreenRect sometimes returns the previous location and dimensions after reopen
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
People
(Reporter: nordzilla, Unassigned)
References
Details
Description
When implementing Bug 1894575 I noticed a peculiar behavior on Linux where calling getOuterScreenRect() on Linux would sometimes return the previous dimensions and location of an arrowpanel after reopening.
I also noticed that calling getBoundingClientRect() before calling getOuterScreenRect() seems to update whatever state is necessary to have getOuterScreenRect() return the most up-to-date location.
Steps to Reproduce
This can be reproduced on Linux when commenting out the call to getBoundingClientRect()
in the SelectTranslationsPanel. I will update this to a searchfox link if/when the code lands and update this bug description accordingly.
Essentially, you need to open the panel in one location, resize it, then open it in a new location, resize it, etc. perhaps while also logging the rect returned by getBoundingClientRect()
and see that the values sometimes pertain to the previous popup open, rather than the current popup open.
Reporter | ||
Updated•10 months ago
|
Comment 1•10 months ago
|
||
https://searchfox.org/mozilla-central/rev/386c7f17b2421374930a447c9f424910551b659d/dom/xul/XULPopupElement.cpp#284 is the reason why getBoundingClientRect "helps". If you change that line to FlushType::Layout then it should return always up-to-date values, I believe? But that means that you're calling it in an dirty state.
Reporter | ||
Comment 2•10 months ago
•
|
||
That's so odd! The FlushTypes were my first guess as to what would be going wrong there, but I jumped all the way down to FlushType:Display for the sake of debugging and I was going to work my way backward to find the right spot, but it still didn't work.
It's possible that something happened, such as I forgot to build the changes, or some stupid mistake like that.
Let me try again right now.
Edit: I am unable to reproduce this time, even with keeping FlushType::Frames
.
Reporter | ||
Comment 3•10 months ago
|
||
I am going to close this for now, because I have been unable to reproduce this since I had the issue.
Description
•