Bug 1047316 - Fix docshell swapping bug by removing usage in marks (unecessary here). r=jaws, a=lmandel
authorShane Caraveo <mixedpuppy>
Wed, 20 Aug 2014 17:03:00 -0400
changeset 208376 58eb677e55f3
parent 208375 2f61f6e44a33
child 208377 3f2d269e3539
child 208379 548fff9b12df
push id3848
push userryanvm@gmail.com
push date2014-08-22 02:08 +0000
treeherdermozilla-beta@58eb677e55f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, lmandel
bugs1047316
milestone32.0
Bug 1047316 - Fix docshell swapping bug by removing usage in marks (unecessary here). r=jaws, a=lmandel
browser/base/content/socialmarks.xml
--- a/browser/base/content/socialmarks.xml
+++ b/browser/base/content/socialmarks.xml
@@ -32,40 +32,33 @@
           return document.getAnonymousElementByAttribute(this, "anonid", "panel");
         </getter>
       </property>
 
       <property name="content">
         <getter><![CDATA[
           if (this._frame)
             return this._frame;
-          let notificationFrameId = "social-mark-frame-" + this.getAttribute("origin");
           let provider = Social._getProviderFromOrigin(this.getAttribute("origin"));
           let size = provider.getPageSize("marks");
           let {width, height} = size ? size : {width: 330, height: 100};
           this._useDynamicResizer = !size;
 
-          this._frame = SharedFrame.createFrame(
-            notificationFrameId, /* frame name */
-            this.panel, /* parent */
-            {
-              "type": "content",
-              "mozbrowser": "true",
-              "class": "social-panel-frame",
-              "id": notificationFrameId,
-              "tooltip": "aHTMLTooltip",
-              "flex": "1",
-              "context": "contentAreaContextMenu",
-              "origin": this.getAttribute("origin"),
-              "src": "about:blank",
-              "style": "width: " + width + "px; height: " + height + "px;",
-            }
-          );
+          let iframe = this._frame = document.createElement("iframe");
+          iframe.setAttribute("type", "content");
+          iframe.setAttribute("class", "social-panel-frame");
+          iframe.setAttribute("flex", "1");
+          iframe.setAttribute("tooltip", "aHTMLTooltip");
+          iframe.setAttribute("context", "contentAreaContextMenu");
+          iframe.setAttribute("src", "about:blank");
+          iframe.setAttribute("origin", provider.origin);
+          iframe.setAttribute("style", "width: " + width + "px; height: " + height + "px;");
+          this.panel.appendChild(iframe);
+
           this._frame.addEventListener("DOMLinkAdded", this);
-          this.setAttribute("notificationFrameId", notificationFrameId);
           return this._frame;
         ]]></getter>
       </property>
 
       <property name="contentWindow">
         <getter>
           return this.content.contentWindow;
         </getter>
@@ -196,21 +189,19 @@
       </method>
 
       <method name="openPanel">
         <parameter name="aResetOnClose"/>
         <body><![CDATA[
         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
-        // only use the selected browser.
+        // All mark buttons use a single panelview to contain their iframes if
+        // they are in the menu-panel. Clear dimensions on all browsers so the
+        // panel size will only use the selected browser.
         let frameIter = panel.firstElementChild;
         while (frameIter) {
           frameIter.collapsed = (frameIter != this.content);
           frameIter = frameIter.nextElementSibling;
         }
 
         // if we're a slice in the hambuger, use that panel instead
         let widgetGroup = CustomizableUI.getWidget(this.getAttribute("id"));