Implement "browser.setClientWindowState" command
Categories
(Remote Protocol :: WebDriver BiDi, task, P3)
Tracking
(firefox151 fixed)
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 4 open bugs, )
Details
(Whiteboard: [webdriver:m20], [wptsync upstream][webdriver:relnote])
Attachments
(3 files, 4 obsolete files)
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
The WebDriver BiDi spec is not done yet. As such we cannot implement it for M9. Lets push onto the backlog for now.
| Assignee | ||
Comment 2•2 years ago
|
||
I accidentally took over the points when cloning the former bug. We need to discuss the complexity.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
I know this is in not is not directly blocking implementing browser.getClientWindows, but shouldn't implementing this come first? browser.getClientWindows needs the getClientWindowState.
(In reply to Dan from comment #3)
I know this is in not is not directly blocking implementing
browser.getClientWindows, but shouldn't implementing this come first?browser.getClientWindowsneeds thegetClientWindowState.
Okay, I looked at the dependency graph again, and this issue is dependent on browser.getClientWindows. browser.getClientWindows does need to return the current state of the client window as part of its return object. So I am not sure if setting it should come first.
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Comment on attachment 9445393 [details]
Bug 1855028 - Migrated GeckoDriver window methods to Window Manager. r?whimboo
Revision D233020 was moved to bug 1942849. Setting attachment 9445393 [details] to obsolete.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•11 months ago
|
||
No update for > 1 month, maybe should be moved to backlog for now.
| Assignee | ||
Comment 11•11 months ago
|
||
Sorry that is my fault. I didn't notice that the revision, that we are waiting for, was updated. I'll do the review.
Updated•11 months ago
|
Updated•11 months ago
|
| Assignee | ||
Comment 12•11 months ago
|
||
I pushed a try build with the latest modifications but I still see quite a number of test failures across platforms:
https://treeherder.mozilla.org/jobs?repo=try&revision=84b8c7f0343094540cbd5aa7b45abcc1d69411ef
Here some things to ensure:
- We need metadata files for Android given that all these tests cannot be run and need to be disabled for that platform
- Transitions between states seem to be fragile - especially minimized to fullscreen seems to fail a lot
- We probably want to run each test in a new window that we can close at the end of the test to not affect the following tests
- We need special handling of assertions for Wayland given that we cannot move the window
Dan, are you still interested to continue working on this bug? I'll make sure to more promptly reply, and in case I miss something you can always ping me on Matrix. Please let us know. Thanks.
Comment 13•11 months ago
|
||
Hi Henrik. Yes, I am still interested in working on the bug.
Comment 14•11 months ago
|
||
Dan: I'm removing it from the milestone because we don't have to track contributions as milestone bugs, but this has no impact on the priority. Feel free to keep working on this and thanks again for your help on this bug!
Updated•11 months ago
|
| Assignee | ||
Comment 15•9 months ago
|
||
Hi Dan, I want to check if you may have an update for us regarding this implementation. If you don't have the time please give us a note and someone can take over the remaining work. Thanks!
| Assignee | ||
Comment 16•9 months ago
|
||
Hi Dan. I assume that you may not find the time to update this patch. Are you ok when one of us is taking over the remaining work? Thanks for the contribution so far!
| Assignee | ||
Comment 17•8 months ago
|
||
Dan, I think that we can pick-up the remaining work to finally get this API landed. For that work we expect 3 points and we could do it in the next milestone starting in October.
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Comment 18•7 months ago
|
||
Liam will take a look at finishing up the patches. Thanks!
Comment 19•7 months ago
|
||
Hey there,
I'm working on getting the tests for this passing. I'm using the work from the previous contributor as a starting point since that has already received reviews from you. Can you clarify the intent behind the stress.py tests? I'd like to better understand what part of the implementation this is testing.
| Assignee | ||
Comment 20•7 months ago
|
||
Great and that's a good starting point!
Regarding the stress tests.... in the past we had issues with the stability of the window resizing methods and especially when you change between different modes and sizes side effects were shown. As such we are trying to stress-test Firefox to see that the way how we implemented the related API works as expected. The tests were already present for the WebDriver classic tests and were just ported over.
Comment 21•7 months ago
|
||
Comment 22•7 months ago
|
||
Updated•5 months ago
|
| Assignee | ||
Updated•5 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 23•4 months ago
|
||
We cannot directly transition from the minimized to the fullscreen state and need to restore the window first if minimized. There is https://github.com/w3c/webdriver-bidi/issues/1035 on file for it.
| Assignee | ||
Comment 24•4 months ago
|
||
I've created https://github.com/w3c/webdriver-bidi/pull/1063 to fix the transition issue.
Updated•4 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 25•4 months ago
|
||
As discussed with Liam I'm going to fix the remaining issue so that we can get this API landed soon. For the remaining work we agreed on 2 points.
| Assignee | ||
Comment 26•3 months ago
|
||
I just noticed that the WebDriver tests need to be updated so that we use Javascript to get the actual window state. Right now we only rely on the values as returned by the command, which doesn't mean it's true.
| Assignee | ||
Comment 27•3 months ago
•
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #26)
I just noticed that the WebDriver tests need to be updated so that we use Javascript to get the actual window state. Right now we only rely on the values as returned by the command, which doesn't mean it's true.
Actually there’s no way to retrieve the actual OS-level window state via a web API, so we can’t add those checks; at least not in the public tests. However, I can add Mozilla-specific tests that obtain the window state via chrome JS.
Otherwise I noticed a discrepancy in the current BiDi spec between OS-level fullscreen and document fullscreen. Right now, BiDi is using document fullscreen, which is not equivalent to the OS-level fullscreen window state. Since this command is intended to modify the OS-level window state, I’m not sure why the document fullscreen API was chosen. It seems like this should be changed.
Lets get this discussed in our next triage meeting.
| Assignee | ||
Comment 28•3 months ago
|
||
As discussed in the meeting today there is not a clear concept of a OS-level window between different operating systems and browsers. So it should be fine to use window.fullScreen = true to activate the fullscreen mode, a``nd win.fullScreen = false to restore the normal state.
If we get any complain that something is not working as expected we can see in how we can update the specification.
| Assignee | ||
Comment 29•2 months ago
|
||
Updated•2 months ago
|
| Assignee | ||
Comment 30•2 months ago
|
||
I can actually see issues on Wayland with the newly added minimization tests. Under that config a request for window.minimize() I can see that the window gets minimized but the window state stays at the former window state. Also waiting for a sizemodechange event doesn't seem to be successful and we timeout after 5s.
Martin, are you aware of issues with minimizing a window on Wayland? Do you have an idea why no sizemodechange event is emitted? If that's expected we might not have to wait for it, but then the window state should be correct.
Comment 31•2 months ago
•
|
||
Hello Henrik, Wayland client generally can't manage its state for security reasons - for instance hide itself and run on background. So there's perhaps a bug in event processing or so but we can't expect client itself can control its state (window position & so). AFAIK only exception is fullscreen state which can be set by application itself.
| Assignee | ||
Comment 32•2 months ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #31)
Hello Henrik, Wayland client generally can't manage its state for security reasons - for instance hide itself and run on background. So there's perhaps a bug in event processing or so but we can't expect client itself can control its state (window position & so). AFAIK only exception is fullscreen state which can be set by application itself.
Hm, but when I run the tests locally with Wayland enabled I can see that the window is hidden. If it's not allowed I would expect that this is a no-op. Also there is bug 1923833 which doesn't let us restore the window from minimize. Given all that I wonder if we should not allow a window to get minimized when Firefox is run in headful mode with Wayland active. The command may return an unsupported error.
Comment 33•2 months ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #32)
Hm, but when I run the tests locally with Wayland enabled I can see that the window is hidden.
Yes, the outcome may differ on actual environment - but it's not guaranteed.
Updated•2 months ago
|
Comment 34•2 months ago
|
||
Comment 36•2 months ago
|
||
Comment 37•2 months ago
|
||
Backed out for causing wd failures at window_rect/set.py
Backout link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | /webdriver/tests/classic/set_window_rect/set.py | test_partial_input[x] - AssertionError: assert 0 == 250
| Assignee | ||
Comment 38•2 months ago
•
|
||
The problem here is:
[task 2026-03-31T18:34:13.003+00:00] 18:34:13 INFO - # Wayland forbids programmatic window movement in headful mode.
[task 2026-03-31T18:34:13.003+00:00] 18:34:13 INFO - if is_wayland_headful:
[task 2026-03-31T18:34:13.003+00:00] 18:34:13 INFO - > assert value["x"] == rect.get("x", original["x"])
Given that this affects the WebDriver classic tests the changes in https://phabricator.services.mozilla.com/D287168 should have caused that. And indeed it looks like that I made a mistake when resolving the merge conflicts. The logic of the test shouldn't have touched at all and should remain as:
Comment 39•2 months ago
|
||
Comment 40•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f0d334bd721d
https://hg.mozilla.org/mozilla-central/rev/e9dae3de1d2c
https://hg.mozilla.org/mozilla-central/rev/c7a664437631
Comment 41•2 months ago
|
||
| bugherder | ||
Comment 43•1 month ago
|
||
Comment 44•1 month ago
|
||
| bugherder | ||
| Assignee | ||
Updated•26 days ago
|
Description
•