Simplify logic for commands manipulating the window states, size and position
Categories
(Remote Protocol :: Marionette, enhancement, P3)
Tracking
(firefox150 fixed)
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webdriver:m19])
Attachments
(2 files)
Towards my work on bug 1855028 it would be great to simplify the current code for Marionette and move some of the extra logic that we need as well for WebDriver BiDi into the WindowManager. Also all of these commands can directly return the new window rect that is needed anyway and saves an extra call from the GeckoDriver.
| Assignee | ||
Comment 1•2 months ago
|
||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
Comment 4•2 months ago
|
||
Backed out for causing multiple failures @ browser_WindowManager.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/4726ad3b8dabb0839913eb177ab15fafa455743e
Failure log -> TEST-UNEXPECTED-FAIL | remote/shared/test/browser/browser_WindowManager.js
| Assignee | ||
Comment 5•2 months ago
|
||
The last try build that I did was all fine and since then I didn't change this test:
https://treeherder.mozilla.org/jobs?repo=try&revision=561f50931bce02beae9664332fe0b7aa74d09dc6
I need to take a closer look tomorrow.
| Assignee | ||
Comment 6•2 months ago
|
||
There are clearly some strange things that I do not see locally:
-
When using float values for the position and size of the window the resizing works fine but the positioning is off. Instead of moving the window to (400,200) it moves it to (320,123) which is for both x and y roughly a difference of ~80px. I cannot reproduce this one locally.
-
For the test
test_adjustWindowGeometry_minimumDimensionswe first try to get the minimum dimensions of the window by resizing it to 50x50, restoring the original size right after, and then resizing the window to (100,100) [here we should probably size to that specific dimension]. The window is now not resized to the minimum dimension but stays large:
[task 2026-02-03T18:25:06.625+00:00] 18:25:06 INFO - GECKO(7931) | 1770143106624 RemoteAgent TRACE Setting window geometry to 50x50 @ (null, null)
[task 2026-02-03T18:25:06.626+00:00] 18:25:06 INFO - GECKO(7931) | 1770143106624 RemoteAgent TRACE Checking window geometry 1280x1077 @ (66, 32)
[task 2026-02-03T18:25:06.700+00:00] 18:25:06 INFO - GECKO(7931) | 1770143106699 RemoteAgent TRACE Received DOM event resize for [object Window]
[task 2026-02-03T18:25:06.700+00:00] 18:25:06 INFO - GECKO(7931) | 1770143106699 RemoteAgent TRACE Checking window geometry 500x157 @ (66, 32)
[task 2026-02-03T18:25:07.139+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107137 RemoteAgent TRACE Setting window geometry to 1280x1077 @ (66, 32)
[task 2026-02-03T18:25:07.139+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107137 RemoteAgent TRACE Checking window geometry 500x157 @ (66, 32)
[task 2026-02-03T18:25:07.141+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107140 RemoteAgent TRACE Received DOM event MozUpdateWindowPos for [object WindowRoot]
[task 2026-02-03T18:25:07.141+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107140 RemoteAgent TRACE Checking window geometry 1280x1077 @ (66, 32)
[task 2026-02-03T18:25:07.142+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107140 RemoteAgent TRACE Requested window geometry matches
[task 2026-02-03T18:25:07.145+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107144 RemoteAgent TRACE Setting window geometry to 100x100 @ (null, null)
[task 2026-02-03T18:25:07.145+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107144 RemoteAgent TRACE Checking window geometry 1280x1077 @ (66, 32)
[task 2026-02-03T18:25:07.188+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107187 RemoteAgent TRACE Received DOM event resize for [object Window]
[task 2026-02-03T18:25:07.189+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107187 RemoteAgent TRACE Checking window geometry 1280x1077 @ (66, 32)
[task 2026-02-03T18:25:07.189+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107187 RemoteAgent TRACE Already found a previous match for this request
[task 2026-02-03T18:25:07.190+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107187 RemoteAgent TRACE Received DOM event resize for [object Window]
[task 2026-02-03T18:25:07.191+00:00] 18:25:07 INFO - GECKO(7931) | 1770143107187 RemoteAgent TRACE Checking window geometry 1280x1077 @ (66, 32)
We seem to exit too early because the window didn't resize (we hit a previous match). Emilio or Martin, would you have an explanation for that?
Comment 7•2 months ago
|
||
Could you take logs with MOZ_LOG=Widget:5 or so? That should provide the necessary context on what's going on on the widget side. Otherwise, not sure really, without being able to reproduce.
The "Already found a previous match for this request" is irrelevant, right? That's probably for the previous request.
| Assignee | ||
Comment 8•2 months ago
|
||
Emilio pointed out that https://phabricator.services.mozilla.com/D280363 didn't land yet and I may have pushed my patches by having this patch applied. So it would make sense given that the tests that are failing are modifying both the size and position.
As such I pushed a try build and it indeed fixes it:
| Assignee | ||
Comment 9•1 month ago
|
||
Now that bug 2012132 is fixed it looks all good. Lets finally land the patch on this bug.
Comment 10•1 month ago
|
||
| Assignee | ||
Comment 11•1 month ago
|
||
| Assignee | ||
Updated•1 month ago
|
Comment 12•1 month ago
|
||
Comment 13•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f8d5e83c9394
https://hg.mozilla.org/mozilla-central/rev/9b3217742fe7
Description
•