Properly support remoteType in RDM

RESOLVED INVALID

Status

()

Firefox
Developer Tools: Responsive Design Mode
P3
normal
RESOLVED INVALID
a year ago
a year ago

People

(Reporter: jryans, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 affected)

Details

(Whiteboard: [rdm-v2][sb?])

After some changes in bug 1318767, RDM is no longer passing `remoteType` correctly to `updateBrowserRemoteness`.

I would also think the <iframe mozbrowser> needs to be passed the `remoteType` as well.

However, in limited manual testing, it does seem we are correctly swapping content in file process, so more investigation is needed...
(Reporter)

Updated

a year ago
Depends on: 1318767
Bug 1331601 fixes part of this by passing the correct arg so that the remoteType is restored on RDM exit.

However, RDM currently assumes remoteType is always "web", which wouldn't be true for file content, for example.
Depends on: 1331601
Bug 1317293 will enforce matching remoteTypes when swapping, which is good for correctness.

I am pretty sure this will break remoteType="file" in RDM for the moment, since the viewport is always created with "web".
Depends on: 1317293

Updated

a year ago
Whiteboard: [rdm-v2] → [rdm-v2][sb?]
:jryans, what are the implications of this bug? I'm having trouble following what happens as a result of this.

For future reference for myself, or others, https://dxr.mozilla.org/mozilla-central/source/devtools/client/responsive.html/components/browser.js?q=path%3Adevtools%2Fclient%2Fresponsive.html%2Fcomponents%2Fbrowser.js&redirect_type=single#139-145 appears to be the "root" place where we actually set a value for |remoteType|, all the other instances of |remoteType| in |devtools/| appear to be passing an existing value through.
Flags: needinfo?(jryans)
Responsive Design Mode creates a separate browser (the one you found in components/browser.js) and uses a docshell swap to move existing content into that browser.

Initially, I expected that `remoteType` would have to match between the browsers for swapping to work (since that's true of most other browser attributes).  Instead however, after bug 1338241, we swap between browsers of any `remoteType`, and then move the `remoteType` labels around afterwards to match up.

Here's STR to make sure things appear okay:

1. Open some file content in a normal tab
2. Double check using the Browser Console that `remoteType` is file (gBrowser.selectedBrowser)
3. Open Responsive Design Mode (Tools -> Web Dev -> RDM)

ER:

The content should appear inside the RDM viewport.

So, I think there's nothing left to do here.
Status: NEW → RESOLVED
Last Resolved: a year ago
Flags: needinfo?(jryans)
Resolution: --- → INVALID
Thanks!
You need to log in before you can comment on or make changes to this bug.