зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1579269 Part 1: Make the document inRDMPane property set via a new emulation actor method. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D51020 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
77bedb6124
Коммит
b5785ce2c6
|
@ -207,6 +207,10 @@ class ResponsiveUI {
|
|||
// Restore the previous state of RDM.
|
||||
await this.restoreState();
|
||||
|
||||
if (this.isBrowserUIEnabled) {
|
||||
await this.emulationFront.setDocumentInRDMPane(true);
|
||||
}
|
||||
|
||||
if (!this.isBrowserUIEnabled) {
|
||||
// Force the newly created Zoom actor to cache its 1.0 zoom level. This
|
||||
// prevents it from sending out FullZoomChange events when the content
|
||||
|
@ -302,6 +306,10 @@ class ResponsiveUI {
|
|||
await this.inited;
|
||||
}
|
||||
|
||||
if (this.isBrowserUIEnabled) {
|
||||
await this.emulationFront.setDocumentInRDMPane(false);
|
||||
}
|
||||
|
||||
this.tab.removeEventListener("TabClose", this);
|
||||
this.tab.removeEventListener("BeforeTabRemotenessChange", this);
|
||||
this.browserWindow.removeEventListener("unload", this);
|
||||
|
|
|
@ -460,6 +460,12 @@ const EmulationActor = protocol.ActorClassWithSpec(emulationSpec, {
|
|||
async captureScreenshot() {
|
||||
return this.screenshotActor.capture({});
|
||||
},
|
||||
|
||||
async setDocumentInRDMPane(inRDMPane) {
|
||||
if (this.docShell && this.docShell.document) {
|
||||
this.docShell.document.inRDMPane = inRDMPane;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
exports.EmulationActor = EmulationActor;
|
||||
|
|
|
@ -179,6 +179,13 @@ const emulationSpec = generateActorSpec({
|
|||
value: RetVal("json"),
|
||||
},
|
||||
},
|
||||
|
||||
setDocumentInRDMPane: {
|
||||
request: {
|
||||
state: Arg(0, "boolean"),
|
||||
},
|
||||
response: {},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче