Backed out changesets a7ef4e7277b4 and a507b6cde54b (bug 1280128) for browser_ext_popup_corners.js failures. FIREFOX_49_0b5_BUILD1 FIREFOX_49_0b5_RELEASE
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 18 Aug 2016 07:42:32 -0400
changeset 407092 91505c2a68fb868bcab1e3dc03ffc2e89bf71cac
parent 407091 8ea0c38aae0b5cdb76bc32f59938424fbde469df
child 407093 98f83e513e456163ea3e682f675b666677967b06
push id27897
push userjwwang@mozilla.com
push dateTue, 30 Aug 2016 03:53:50 +0000
bugs1280128
milestone49.0
backs outa7ef4e7277b4f9d3a1fdf96a5c62c07745c06e73
a507b6cde54bf184a9ae36e76532e7e947967073
Backed out changesets a7ef4e7277b4 and a507b6cde54b (bug 1280128) for browser_ext_popup_corners.js failures.
browser/components/extensions/ext-utils.js
browser/components/extensions/extension.css
browser/components/extensions/test/browser/browser.ini
browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
browser/components/extensions/test/browser/browser_ext_popup_corners.js
browser/components/extensions/test/browser/head.js
browser/themes/linux/browser.css
browser/themes/osx/browser.css
browser/themes/shared/customizableui/panelUIOverlay.inc.css
browser/themes/windows/browser.css
--- a/browser/components/extensions/ext-utils.js
+++ b/browser/components/extensions/ext-utils.js
@@ -266,17 +266,16 @@ class BasePopup {
     }
   }
 
   createBrowser(viewNode, popupURI) {
     let document = viewNode.ownerDocument;
     this.browser = document.createElementNS(XUL_NS, "browser");
     this.browser.setAttribute("type", "content");
     this.browser.setAttribute("disableglobalhistory", "true");
-    this.browser.setAttribute("transparent", "true");
 
     // Note: When using noautohide panels, the popup manager will add width and
     // height attributes to the panel, breaking our resize code, if the browser
     // starts out smaller than 30px by 10px. This isn't an issue now, but it
     // will be if and when we popup debugging.
 
     // This overrides the content's preferred size when displayed in a
     // fixed-size, slide-in panel.
--- a/browser/components/extensions/extension.css
+++ b/browser/components/extensions/extension.css
@@ -6,17 +6,17 @@ select,
 option,
 input {
   -moz-appearance: none;
 }
 
 /* Variables */
 html,
 body {
-  background: transparent;
+  background-color: #fcfcfc;
   box-sizing: border-box;
   color: #222426;
   cursor: default;
   display: flex;
   flex-direction: column;
   font: caption;
   margin: 0;
   padding: 0;
--- a/browser/components/extensions/test/browser/browser.ini
+++ b/browser/components/extensions/test/browser/browser.ini
@@ -31,17 +31,16 @@ support-files =
 [browser_ext_getViews.js]
 [browser_ext_history.js]
 [browser_ext_lastError.js]
 [browser_ext_optionsPage_privileges.js]
 [browser_ext_pageAction_context.js]
 [browser_ext_pageAction_popup.js]
 [browser_ext_pageAction_simple.js]
 [browser_ext_popup_api_injection.js]
-[browser_ext_popup_corners.js]
 [browser_ext_runtime_openOptionsPage.js]
 [browser_ext_runtime_setUninstallURL.js]
 [browser_ext_simple.js]
 [browser_ext_tab_runtimeConnect.js]
 [browser_ext_tabs_audio.js]
 [browser_ext_tabs_captureVisibleTab.js]
 [browser_ext_tabs_create.js]
 [browser_ext_tabs_create_invalid_url.js]
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
@@ -15,18 +15,18 @@ function* testInArea(area) {
         "browser_style": true,
       },
     },
 
     files: {
       "popup-a.html": scriptPage("popup-a.js"),
       "popup-a.js": function() {
         window.onload = () => {
-          let color = window.getComputedStyle(document.body).color;
-          browser.test.assertEq("rgb(34, 36, 38)", color);
+          let background = window.getComputedStyle(document.body).backgroundColor;
+          browser.test.assertEq("rgb(252, 252, 252)", background);
           browser.runtime.sendMessage("from-popup-a");
         };
         browser.runtime.onMessage.addListener(msg => {
           if (msg == "close-popup") {
             window.close();
           }
         });
       },
deleted file mode 100644
--- a/browser/components/extensions/test/browser/browser_ext_popup_corners.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-function* awaitPanel(extension, win = window) {
-  let {target} = yield BrowserTestUtils.waitForEvent(win.document, "load", true, (event) => {
-    return event.target.location && event.target.location.href.endsWith("popup.html");
-  });
-
-  // Wait for the browser resize code, which is triggered asynchronously by the
-  // load event, to run.
-  yield new Promise(resolve => setTimeout(resolve, 10));
-
-  return target.defaultView
-               .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDocShell)
-               .chromeEventHandler;
-}
-
-add_task(function* testPopupBorderRadius() {
-  let extension = ExtensionTestUtils.loadExtension({
-    background() {
-      browser.tabs.query({active: true, currentWindow: true}, tabs => {
-        browser.pageAction.show(tabs[0].id);
-      });
-    },
-
-    manifest: {
-      "browser_action": {
-        "default_popup": "popup.html",
-        "browser_style": false,
-      },
-
-      "page_action": {
-        "default_popup": "popup.html",
-        "browser_style": false,
-      },
-    },
-
-    files: {
-      "popup.html": `<!DOCTYPE html>
-        <html>
-          <head><meta charset="utf-8"></head>
-          <body style="width: 100px; height: 100px;"></body>
-        </html>`,
-    },
-  });
-
-  yield extension.startup();
-
-  function* testPanel(browser, standAlone = true) {
-    let panel = getPanelForNode(browser);
-    let arrowContent = document.getAnonymousElementByAttribute(panel, "class", "panel-arrowcontent");
-
-    let panelStyle = getComputedStyle(arrowContent);
-
-    let viewNode = browser.parentNode === panel ? browser : browser.parentNode;
-    let viewStyle = getComputedStyle(viewNode);
-
-    for (let prop of ["borderTopLeftRadius", "borderTopRightRadius",
-                      "borderBottomRightRadius", "borderBottomLeftRadius"]) {
-      if (standAlone) {
-        is(viewStyle[prop], panelStyle[prop], `Panel and view ${prop} should be the same`);
-      } else {
-        is(viewStyle[prop], "0px", `View node ${prop} should be 0px`);
-      }
-    }
-  }
-
-  {
-    info("Test stand-alone browserAction popup");
-
-    clickBrowserAction(extension);
-    let browser = yield awaitPanel(extension);
-    yield testPanel(browser);
-    yield closeBrowserAction(extension);
-  }
-
-  {
-    info("Test menu panel browserAction popup");
-
-    let widget = getBrowserActionWidget(extension);
-    CustomizableUI.addWidgetToArea(widget.id, CustomizableUI.AREA_PANEL);
-
-    clickBrowserAction(extension);
-    let browser = yield awaitPanel(extension);
-    yield testPanel(browser, false);
-    yield closeBrowserAction(extension);
-  }
-
-  {
-    info("Test pageAction popup");
-
-    clickPageAction(extension);
-    let browser = yield awaitPanel(extension);
-    yield testPanel(browser);
-    yield closePageAction(extension);
-  }
-
-  yield extension.unload();
-});
--- a/browser/components/extensions/test/browser/head.js
+++ b/browser/components/extensions/test/browser/head.js
@@ -3,17 +3,16 @@
 "use strict";
 
 /* exported CustomizableUI makeWidgetId focusWindow forceGC
  *          getBrowserActionWidget
  *          clickBrowserAction clickPageAction
  *          getBrowserActionPopup getPageActionPopup
  *          closeBrowserAction closePageAction
  *          promisePopupShown promisePopupHidden
- *          getPanelForNode
  */
 
 var {AppConstants} = Cu.import("resource://gre/modules/AppConstants.jsm");
 var {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm");
 
 // Bug 1239884: Our tests occasionally hit a long GC pause at unpredictable
 // times in debug builds, which results in intermittent timeouts. Until we have
 // a better solution, we force a GC after certain strategic tests, which tend to
@@ -65,23 +64,16 @@ function promisePopupHidden(popup) {
     let onPopupHidden = event => {
       popup.removeEventListener("popuphidden", onPopupHidden);
       resolve();
     };
     popup.addEventListener("popuphidden", onPopupHidden);
   });
 }
 
-function getPanelForNode(node) {
-  while (node.localName != "panel") {
-    node = node.parentNode;
-  }
-  return node;
-}
-
 function getBrowserActionWidget(extension) {
   return CustomizableUI.getWidget(makeWidgetId(extension.id) + "-browser-action");
 }
 
 function getBrowserActionPopup(extension, win = window) {
   let group = getBrowserActionWidget(extension);
 
   if (group.areaType == CustomizableUI.TYPE_TOOLBAR) {
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -1934,15 +1934,11 @@ notification.pluginVulnerable > .notific
   margin-inline-end: 0 !important;
 }
 
 .browser-extension-panel > .panel-arrowcontainer > .panel-arrowcontent {
   padding: 0;
   overflow: hidden;
 }
 
-.webextension-popup-browser {
-  border-radius: inherit;
-}
-
 .menuitem-iconic[command="Browser:NewUserContextTab"] > .menu-iconic-left > .menu-iconic-icon {
   visibility: visible;
 }
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -3538,16 +3538,8 @@ menulist.translate-infobar-element > .me
   padding-left: 0;
   padding-right: 0;
 }
 
 .browser-extension-panel > .panel-arrowcontainer > .panel-arrowcontent {
   padding: 0;
   overflow: hidden;
 }
-
-.cui-widget-panelview[id^=PanelUI-webext-] {
-  border-radius: 3.5px;
-}
-
-.webextension-popup-browser {
-  border-radius: inherit;
-}
--- a/browser/themes/shared/customizableui/panelUIOverlay.inc.css
+++ b/browser/themes/shared/customizableui/panelUIOverlay.inc.css
@@ -268,16 +268,20 @@ panelmultiview[nosubviews=true] > .panel
 .cui-widget-panel[viewId^=PanelUI-webext-] .panel-mainview {
   max-width: 800px;
 }
 
 .cui-widget-panel[viewId^=PanelUI-webext-] > .panel-arrowcontainer > .panel-arrowcontent {
   padding: 0;
 }
 
+.cui-widget-panelview[id^=PanelUI-webext-] {
+  border-radius: 3.5px;
+}
+
 panelview:not([mainview]) .toolbarbutton-text,
 .cui-widget-panel toolbarbutton > .toolbarbutton-text {
   text-align: start;
   display: -moz-box;
 }
 
 .cui-widget-panel > .panel-arrowcontainer > .panel-arrowcontent {
   padding: 4px 0;
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -2694,20 +2694,8 @@ notification.pluginVulnerable > .notific
 @media not all and (-moz-os-version: windows-xp) {
 %include browser-aero.css
 }
 
 .browser-extension-panel > .panel-arrowcontainer > .panel-arrowcontent {
   padding: 0;
   overflow: hidden;
 }
-
-@media (-moz-os-version: windows-xp),
-       (-moz-os-version: windows-vista),
-       (-moz-os-version: windows-win7) {
-  .cui-widget-panelview[id^=PanelUI-webext-] {
-    border-radius: 4px;
-  }
-}
-
-.webextension-popup-browser {
-  border-radius: inherit;
-}