Closed Bug 1330403 Opened 6 years ago Closed 6 years ago

Properly support remoteType in RDM


(DevTools :: Responsive Design Mode, defect, P3)



(firefox53 affected)

Tracking Status
firefox53 --- affected


(Reporter: jryans, Unassigned)



(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...
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
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, 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)


The content should appear inside the RDM viewport.

So, I think there's nothing left to do here.
Closed: 6 years ago
Flags: needinfo?(jryans)
Resolution: --- → INVALID
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.