Skip to content

Commit

Permalink
Bug 1007601 Fix styling of the loop panel so it is laid out properly …
Browse files Browse the repository at this point in the history
…and without a white border. Also make the iframe creation dynamic, to avoid an iframe in the DOM when we don't need one. r=mhammond
  • Loading branch information
Standard8 committed May 16, 2014
1 parent 8eaf4c5 commit d9aad23
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 11 additions & 1 deletion browser/base/content/browser-loop.js
Expand Up @@ -23,6 +23,16 @@ XPCOMUtils.defineLazyModuleGetter(this, "MozLoopService", "resource:///modules/l
let anchor = event.target;
let iframe = document.getElementById("loop-panel-frame");

if (!iframe) {
// XXX This should be using SharedFrame (bug 1011392 may do this).
iframe = document.createElement("iframe");
iframe.setAttribute("id", "loop-panel-frame");
iframe.setAttribute("type", "content");
iframe.setAttribute("class", "loop-frame social-panel-frame");
iframe.setAttribute("flex", "1");
panel.appendChild(iframe);
}

// We inject in DOMContentLoaded as that is before any scripts have tun.
iframe.addEventListener("DOMContentLoaded", function documentDOMLoaded() {
iframe.removeEventListener("DOMContentLoaded", documentDOMLoaded, true);
Expand All @@ -35,7 +45,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "MozLoopService", "resource:///modules/l
iframe.contentWindow.removeEventListener("loopPanelInitialized",
documentLoaded, true);
// XXX We end up with the wrong size here, so this
// needs investigation (bug 1007601).
// needs further investigation (bug 1011394).
sizeSocialPanelToContent(panel, iframe);
}, true);

Expand Down
8 changes: 2 additions & 6 deletions browser/base/content/browser.xul
Expand Up @@ -267,14 +267,10 @@

#ifdef MOZ_LOOP
<panel id="loop-panel"
class="loop-panel"
class="loop-panel social-panel"
type="arrow"
orient="horizontal"
hidden="true">
<iframe id="loop-panel-frame"
type="content"
/>
</panel>
hidden="true"/>
#endif

<menupopup id="toolbar-context-menu"
Expand Down

0 comments on commit d9aad23

Please sign in to comment.