mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 759754 - With toolbar.customization.usesheet=true, the customization document stays alive after closing the sheet. r=ttaubert
This commit is contained in:
parent
c433fcf3a7
commit
af98e7ca79
@ -3505,19 +3505,13 @@ function BrowserCustomizeToolbar()
|
||||
gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
|
||||
|
||||
if (gCustomizeSheet) {
|
||||
var sheetFrame = document.getElementById("customizeToolbarSheetIFrame");
|
||||
var panel = document.getElementById("customizeToolbarSheetPopup");
|
||||
sheetFrame.hidden = false;
|
||||
let sheetFrame = document.createElement("iframe");
|
||||
let panel = document.getElementById("customizeToolbarSheetPopup");
|
||||
sheetFrame.id = "customizeToolbarSheetIFrame";
|
||||
sheetFrame.toolbox = gNavToolbox;
|
||||
sheetFrame.panel = panel;
|
||||
|
||||
// The document might not have been loaded yet, if this is the first time.
|
||||
// If it is already loaded, reload it so that the onload initialization code
|
||||
// re-runs.
|
||||
if (sheetFrame.getAttribute("src") == customizeURL)
|
||||
sheetFrame.contentWindow.location.reload()
|
||||
else
|
||||
sheetFrame.setAttribute("src", customizeURL);
|
||||
sheetFrame.setAttribute("style", panel.getAttribute("sheetstyle"));
|
||||
panel.appendChild(sheetFrame);
|
||||
|
||||
// Open the panel, but make it invisible until the iframe has loaded so
|
||||
// that the user doesn't see a white flash.
|
||||
@ -3526,6 +3520,9 @@ function BrowserCustomizeToolbar()
|
||||
gNavToolbox.removeEventListener("beforecustomization", onBeforeCustomization, false);
|
||||
panel.style.removeProperty("visibility");
|
||||
}, false);
|
||||
|
||||
sheetFrame.setAttribute("src", customizeURL);
|
||||
|
||||
panel.openPopup(gNavToolbox, "after_start", 0, 0);
|
||||
return sheetFrame.contentWindow;
|
||||
} else {
|
||||
@ -3538,8 +3535,9 @@ function BrowserCustomizeToolbar()
|
||||
|
||||
function BrowserToolboxCustomizeDone(aToolboxChanged) {
|
||||
if (gCustomizeSheet) {
|
||||
document.getElementById("customizeToolbarSheetIFrame").hidden = true;
|
||||
document.getElementById("customizeToolbarSheetPopup").hidePopup();
|
||||
let iframe = document.getElementById("customizeToolbarSheetIFrame");
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
}
|
||||
|
||||
// Update global UI elements that may have been added or removed
|
||||
|
@ -344,11 +344,8 @@
|
||||
<tooltip id="bhTooltip"/>
|
||||
|
||||
<panel id="customizeToolbarSheetPopup"
|
||||
noautohide="true">
|
||||
<iframe id="customizeToolbarSheetIFrame"
|
||||
style="&dialog.dimensions;"
|
||||
hidden="true"/>
|
||||
</panel>
|
||||
noautohide="true"
|
||||
sheetstyle="&dialog.dimensions;"/>
|
||||
|
||||
<tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user