Bug 1634448 - Remove some unused references to the old profiler popup iframe; r=canaltinova

These were left-over from the previous implementation.

Differential Revision: https://phabricator.services.mozilla.com/D75849
This commit is contained in:
Greg Tatum 2020-05-26 15:42:20 +00:00
Родитель 7c966cd62c
Коммит b5e1be1d8d
2 изменённых файлов: 0 добавлений и 51 удалений

Просмотреть файл

@ -260,10 +260,6 @@ toolbar[brighttext] {
list-style-image: url("chrome://devtools/skin/images/profiler-stopwatch.svg");
}
#PanelUI-profilerIframe {
width: 450px;
}
#preferences-button {
list-style-image: url("chrome://global/skin/icons/settings.svg");
}

Просмотреть файл

@ -158,20 +158,6 @@ function maybeGetElementFromDocumentByText(document, text) {
return getElementByXPath(document, xpath);
}
/**
* Returns the popup's document.
* @returns {Document}
*/
function getIframeDocument() {
const iframe = document.getElementById("PanelUI-profilerIframe");
if (!iframe) {
throw new Error(
"This function assumes the profiler iframe is already present."
);
}
return iframe.contentDocument;
}
/**
* Make sure the profiler popup is enabled.
*/
@ -317,39 +303,6 @@ async function waitForTabTitle(title) {
});
}
/**
* Close the popup, and wait for it to be destroyed.
*/
async function closePopup() {
const iframe = document.querySelector("#PanelUI-profilerIframe");
if (!iframe) {
throw new Error(
"Could not find the profiler iframe when attempting to close the popup. Was it " +
"already closed?"
);
}
const panel = iframe.closest("panel");
if (!panel) {
throw new Error(
"Could not find the closest panel to the profiler's iframe."
);
}
info("Hide the profiler popup.");
panel.hidePopup();
info("Wait for the profiler popup to be completely hidden.");
while (true) {
if (!iframe.ownerDocument.contains(iframe)) {
info("The iframe was removed.");
return;
}
await tick();
}
}
/**
* Open about:profiling in a new tab, and output helpful log messages.
*