зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539979 - Create toolbox iframe for Window host with helper;r=bgrins
Depends on D26316 Instead of using a hardcoded iframe in toolbox-window.xul, reuse the same helper as for the other hosts. Will facilitate switching to type="content". Differential Revision: https://phabricator.services.mozilla.com/D26317 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
edcc1fac74
Коммит
027cdd0432
|
@ -84,7 +84,7 @@ async function testWindowHost() {
|
||||||
const win = Services.wm.getMostRecentWindow("devtools:toolbox");
|
const win = Services.wm.getMostRecentWindow("devtools:toolbox");
|
||||||
ok(win, "toolbox separate window exists");
|
ok(win, "toolbox separate window exists");
|
||||||
|
|
||||||
const iframe = win.document.getElementById("toolbox-iframe");
|
const iframe = win.document.querySelector(".devtools-toolbox-window-iframe");
|
||||||
checkToolboxLoaded(iframe);
|
checkToolboxLoaded(iframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,8 +249,15 @@ WindowHost.prototype = {
|
||||||
win.removeEventListener("load", frameLoad, true);
|
win.removeEventListener("load", frameLoad, true);
|
||||||
win.focus();
|
win.focus();
|
||||||
|
|
||||||
this.frame = win.document.getElementById("toolbox-iframe");
|
this.frame = createDevToolsFrame(win.document, "devtools-toolbox-window-iframe");
|
||||||
this.emit("ready", this.frame);
|
win.document.getElementById("devtools-toolbox-window").appendChild(this.frame);
|
||||||
|
|
||||||
|
// The forceOwnRefreshDriver attribute is set to avoid Windows only issues with
|
||||||
|
// CSS transitions when switching from docked to window hosts.
|
||||||
|
// Added in Bug 832920, should be reviewed in Bug 1542468.
|
||||||
|
this.frame.setAttribute("forceOwnRefreshDriver", "");
|
||||||
|
|
||||||
|
this.frame.setAttribute("src", "about:blank");
|
||||||
resolve(this.frame);
|
resolve(this.frame);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,5 +14,4 @@
|
||||||
width="900" height="320"
|
width="900" height="320"
|
||||||
persist="screenX screenY width height sizemode">
|
persist="screenX screenY width height sizemode">
|
||||||
<tooltip id="aHTMLTooltip" page="true"/>
|
<tooltip id="aHTMLTooltip" page="true"/>
|
||||||
<iframe id="toolbox-iframe" flex="1" forceOwnRefreshDriver="" tooltip="aHTMLTooltip"></iframe>
|
|
||||||
</window>
|
</window>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче