So, currently the test passes only because we end up running it fast enough so that perf mode is still on after page load. If I force non-perf mode, the test fails occasionally.
This sounds very similar to https://bugzilla.mozilla.org/show_bug.cgi?id=522956#c17
https://tbpl.mozilla.org/?tree=Try&rev=e21fe1ebd028 This seems to help locally, and is based on https://bugzilla.mozilla.org/show_bug.cgi?id=522956#c17 (Karl seems to be on vacation) Karl, do you know if we could somehow get accurate information from gtk, hopefully without doing tons of sync X stuff?
Attachment #8360767 - Flags: review?(roc)
Attachment #8360767 - Flags: review?(roc) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
(In reply to Olli Pettay [:smaug] from comment #3) > This seems to help locally, and is based on > https://bugzilla.mozilla.org/show_bug.cgi?id=522956#c17 > Karl, do you know if we could somehow get accurate information from gtk, > hopefully without doing tons of sync X stuff? Bug 522956 comment 17 is about the position, but I guess things were going wrong here because the size dimensions are handled differently from the position. nsIWidget::GetScreenBounds is returning the size from the most recent resize request or resize (size-allocate) event. If several resize requests are sent, then several resized events will be received. The most recently received resized event may not necessarily be the most up to date size, and this would cause problems for resizeBy(), which uses GetScreenBounds. Perhaps GetScreenBounds() should use gdk_window_get_geometry() for toplevel windows to be consistent with the position info. Or perhaps OnSizeAllocate could use gdk_window_get_geometry to ensure it doesn't use out-of-date info. To make things worse, the script can't detect when all the resized events are received because JS resized events are dispatched when a resize request is sent as well as when a native resized event is received. I don't know why the resized event is generated on request - perhaps that code should be removed.
You need to log in before you can comment on or make changes to this bug.