Closed Bug 1944570 Opened 1 year ago Closed 2 months ago

Support executing “script.evaluate” and “script.callFunction” for browsing contexts in the parent process

Categories

(Remote Protocol :: WebDriver BiDi, task, P2)

task
Points:
3

Tracking

(firefox148 fixed)

RESOLVED FIXED
148 Branch
Tracking Status
firefox148 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 5 open bugs)

Details

(Whiteboard: [webdriver:m18][webdriver:relnote])

Attachments

(3 files)

To support the evaluation of JavaScript in the parent process, the existing JSWindowActor implementation for the MessageHandler can be reused. No additional work is required because the actor can be enabled for Chrome by setting the includeChrome field in the actor configuration to true during registration.

This feature should only be taken into account when system access is enabled to avoid unintended side effects in the normal operational mode.
Once enabled, the JSWindowActor will automatically route IPC messages to the appropriate target BrowsingContext, whether it resides in the content or parent process.

Also we do not want to enable support for the parent process for all available WebDriver BiDi commands (particularly event subscriptions) at that point. So an additional internal flag will most likely be required. It can be passed by the two evaluation commands to the underlying MessageHandler to indicate that it is allowed to forward the command to the parent process. Commands that do not set this flag will be aborted with an "operation not supported" error when a browsing context of the parent process is referenced.

Whiteboard: [webdriver:m15] → [webdriver:m16]
Whiteboard: [webdriver:m16] → [webdriver:m17]
Blocks: 1977758
Whiteboard: [webdriver:m17] → [webdriver:m18]
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Blocks: 1713440

As discussed on Matrix I'm going to reduce the points for this bug because support for realms as target cannot be implemented yet because the message manager misses support for chrome browsing contexts. There is bug 1713440 to get the support added.

Points: 5 → 3
Blocks: 2006395
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2be355c689d5 https://hg.mozilla.org/integration/autoland/rev/bb0c513026eb [remote] Allow loading the MessageHandlerFrameActor for chrome scope. r=Sasha https://github.com/mozilla-firefox/firefox/commit/dea83376f29e https://hg.mozilla.org/integration/autoland/rev/0b8681969bab [remote] Only use the webprogress in the RootTransport module for content browsing contexts. r=Sasha https://github.com/mozilla-firefox/firefox/commit/bcad9346c1f3 https://hg.mozilla.org/integration/autoland/rev/55119776daff [webdriver-bidi] Support executing “script.evaluate” and “script.callFunction” for chrome browsing contexts. r=Sasha
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
Whiteboard: [webdriver:m18] → [webdriver:m18][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: