Closed Bug 2002949 Opened 2 months ago Closed 1 month ago

"WindowManager.getIdForWindow" should not be shared between Marionette and Remote Agent

Categories

(Remote Protocol :: Agent, task, P3)

task
Points:
2

Tracking

(firefox148 fixed)

RESOLVED FIXED
148 Branch
Tracking Status
firefox148 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [webdriver:m18])

Attachments

(2 files)

Windows are a different concept between Marionette and WebDriver BiDi. While for Marionette it relates to the top-level browsing context within the currently selected tab - or in case of chrome scope to the top-level browsing context of the active chrome window, in WebDriver BiDi each browsing context is a frame, and the real ChromeWindow is the clientWindow.

This is currently causing issues when code is shared in the WindowManager class, especially for generating / retrieving window ids. Parts of this problem I'm going to remove with my changes over on bug 2000801. But we should probably clear the usage of any WindowManager method from within Marionette which is not really related to manipulating the browsing window. What could be left is clearly the adjustWindowGeometry method.

By that we make sure that:

  • The id for a clientWindow is currently only used in BiDi
  • The id of a top-level browsing context is handled by the NavigableManager, this includes the top-level browsing context for Marionette

There is as well the getIdForBrowsingContext method

Points: --- → 2
Priority: -- → P3
Whiteboard: [webdriver:m18]
Assignee: nobody → hskupin
Status: NEW → ASSIGNED

With WebDriver BiDi the clientWindow is referring to a ChromeWindow
instance while in Marionette a window is a top-level browsing
context. As such the same ids should not be shared, but Marionette
needs to rely on Navigable ids based on the top-level browsing
context.

Blocks: 2004388
Blocks: 2007343
Attachment #9534050 - Attachment description: Bug 2002949 - [remote] Don't share the clientWindowIds of the WindowManager with Marionette. → Bug 2002949 - [remote] Don't share the clientWindow ids of the WindowManager with Marionette.
Attachment #9534049 - Attachment description: Bug 2002949 - [remote] Add WindowListener to listen for "opened" and "closed" events of Chrome windows. → Bug 2002949 - [remote] Add ChromeWindowListener to listen for "opened" and "closed" events of Chrome windows.
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/116b1706e6db https://hg.mozilla.org/integration/autoland/rev/66225f469809 [remote] Add ChromeWindowListener to listen for "opened" and "closed" events of Chrome windows. r=Sasha https://github.com/mozilla-firefox/firefox/commit/1cb031c1390a https://hg.mozilla.org/integration/autoland/rev/7eff4951647e [remote] Don't share the clientWindow ids of the WindowManager with Marionette. r=Sasha
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
Blocks: 1855028
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: