Closed Bug 1558520 Opened 3 years ago Closed 2 years ago

Make RemoteController.jsm work with OOP frames

Categories

(Toolkit :: General, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla76
Fission Milestone M5
Tracking Status
firefox76 --- fixed

People

(Reporter: enndeakin, Assigned: enndeakin)

References

(Regressed 1 open bug)

Details

Attachments

(2 files, 2 obsolete files)

No description provided.

Hey Neil, is this looking for a reviewer? Or is this still a WIP?

Flags: needinfo?(enndeakin)

I haven't tested it fully yet.

Flags: needinfo?(enndeakin)
Fission Milestone: --- → M5

Neil, do you think this bug should block Fission's internal dogfooding (milestone M5)? Or can this fix wait until we're preparing to enable Fission on Nightly (M6)?

What happens if RemoteController.jsm doesn't work in OOP iframes?

Flags: needinfo?(enndeakin)

It should be M5. The commands on the edit menu won't work otherwise.

Flags: needinfo?(enndeakin)
Attachment #9074289 - Attachment is obsolete: true

The patch I had written long ago doesn't really work very well. The best solution I think would be to convert the controller into a JSWindowActor and sync the command state from the child to the parent actor when needed. Then, be able to access the currently active browsing context from the parent process and just use that in nsWindowRoot::GetEnabledDisabledCommands, which in turn would get the controller information from the actor. This should be straightforward once the general focus bug 1556627 is complete. That would also make this much easier to test.

Depends on: 1556627
Depends on: 1607214

When searching for the controller for a command in nsWindowRoot::GetControllerForCommand, look for a focused browsing context instead and get the controller through the Controllers actor associated with that browsing context. Similarly, when updating the commands in ChildCommandDispatcher, invoke a function on the Controllers actor associated with the window being updated. The enabled commands are synchronized through the child/parent actors. As long as we can get the right currently focused browsing context descendant, we can get the correct command state and invoke commands through the right actor.

Should we dupe bug 1534172 over to this bug - or perhaps just close as invalid once this lands?

Depends on: 1616352

When searching for the controller for a command in nsWindowRoot::GetControllerForCommand, look for a focused browsing context instead and get the controller through the Controllers actor associated with that browsing context. When a command update occurs in a window in the child process, send the list of commands to the parent process along with the browsing context for that window. The parent will pass this information to the controllers actor. As long as we can get the right currently focused browsing context descendant, we can get the correct command state and invoke commands through the right actor.

Attachment #9118840 - Attachment is obsolete: true
Pushed by neil@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/044a624353ea
rework remote controller to use JSWindowActor instead of having the browser have a controller, r=smaug
https://hg.mozilla.org/integration/autoland/rev/181227bb4222
test that controllers work with out of process iframes of various arrangements, r=smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Regressions: 1622998
Regressions: 1681712
You need to log in before you can comment on or make changes to this bug.