Bug 1027014 Loop panel is cut off on first display - always fire the mechanism to resive the panel if the ready state is complete. r=mixedpuppy

This commit is contained in:
Mark Banner 2014-06-30 21:10:19 +01:00
parent 9dd7bf06dc
commit 794bbc9518
3 changed files with 1 additions and 12 deletions

View File

@ -24,15 +24,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "PanelFrame", "resource:///modules/Panel
iframe.addEventListener("DOMContentLoaded", function documentDOMLoaded() {
iframe.removeEventListener("DOMContentLoaded", documentDOMLoaded, true);
injectLoopAPI(iframe.contentWindow);
// We use loopPanelInitialized so that we know we've finished localising before
// sizing the panel.
iframe.contentWindow.addEventListener("loopPanelInitialized",
function documentLoaded() {
iframe.contentWindow.removeEventListener("loopPanelInitialized",
documentLoaded, true);
}, true);
}, true);
};

View File

@ -212,7 +212,6 @@
let panel = this.panel;
let frameId = this.getAttribute("notificationFrameId");
let wasAlive = SharedFrame.isGroupAlive(frameId);
SharedFrame.setOwner(frameId, this.content);
// Clear dimensions on all browsers so the panel size will

View File

@ -135,7 +135,6 @@ let PanelFrame = {
let notificationFrameId = aToolbarButton.getAttribute("notificationFrameId");
let notificationFrame = aWindow.document.getElementById(notificationFrameId);
let wasAlive = SharedFrame.isGroupAlive(notificationFrameId);
SharedFrame.setOwner(notificationFrameId, notificationFrame);
// Clear dimensions on all browsers so the panel size will
@ -184,7 +183,7 @@ let PanelFrame = {
if (!inMenuPanel)
anchorBtn.setAttribute("open", "true");
if (notificationFrame.contentDocument &&
notificationFrame.contentDocument.readyState == "complete" && wasAlive) {
notificationFrame.contentDocument.readyState == "complete") {
initFrameShow();
} else {
// first time load, wait for load and dispatch after load