Back out changeset 4357fe5a9d22 (bug 1206560) for M-e10s(bc4) failures.
authorKit Cambridge <kcambridge@mozilla.com>
Tue, 16 Feb 2016 16:13:38 -0800
changeset 284374 e11a1992df5566ddfdb041c629297197bc6043a6
parent 284373 365535caf11800c004297431d30c22ba151311fc
child 284375 66831b3d59bd2d3de39b2845cdf5a555c184f2e0
push id17640
push userkcambridge@mozilla.com
push dateWed, 17 Feb 2016 00:18:08 +0000
treeherderfx-team@e0197b0616f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1206560
milestone47.0a1
backs out4357fe5a9d22822ffbc5d15246c7df34a484816f
Back out changeset 4357fe5a9d22 (bug 1206560) for M-e10s(bc4) failures. MozReview-Commit-ID: 1J0li7PNBWN
browser/base/content/test/alerts/browser_notification_close.js
browser/base/content/test/alerts/file_dom_notifications.html
toolkit/components/alerts/nsXULAlerts.cpp
toolkit/components/alerts/nsXULAlerts.h
toolkit/components/alerts/resources/content/alert.css
toolkit/components/alerts/resources/content/alert.js
toolkit/components/alerts/resources/content/alert.xul
toolkit/themes/shared/alert-common.css
--- a/browser/base/content/test/alerts/browser_notification_close.js
+++ b/browser/base/content/test/alerts/browser_notification_close.js
@@ -24,18 +24,16 @@ add_task(function* test_notificationClos
       notification.close();
       return;
     }
 
     let alertTitleLabel = alertWindow.document.getElementById("alertTitleLabel");
     is(alertTitleLabel.value, "Test title", "Title text of notification should be present");
     let alertTextLabel = alertWindow.document.getElementById("alertTextLabel");
     is(alertTextLabel.textContent, "Test body", "Body text of notification should be present");
-    let alertIcon = alertWindow.document.getElementById("alertIcon");
-    ok(alertIcon.src, "Icon of notification should be present");
 
     let alertCloseButton = alertWindow.document.querySelector(".alertCloseButton");
     is(alertCloseButton.localName, "toolbarbutton", "close button found");
     let promiseBeforeUnloadEvent =
       BrowserTestUtils.waitForEvent(alertWindow, "beforeunload");
     let closedTime = alertWindow.Date.now();
     alertCloseButton.click();
     info("Clicked on close button");
--- a/browser/base/content/test/alerts/file_dom_notifications.html
+++ b/browser/base/content/test/alerts/file_dom_notifications.html
@@ -1,12 +1,11 @@
 <html>
 <head>
 <meta charset="utf-8">
-<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12P4//8/AAX+Av7czFnnAAAAAElFTkSuQmCC">
 <script>
 "use strict";
 
 function showNotification1() {
   var options = {
       dir: undefined,
       lang: undefined,
       body: "Test body",
--- a/toolkit/components/alerts/nsXULAlerts.cpp
+++ b/toolkit/components/alerts/nsXULAlerts.cpp
@@ -43,17 +43,17 @@ nsXULAlertObserver::Observe(nsISupports*
 
   nsresult rv = NS_OK;
   if (mObserver) {
     rv = mObserver->Observe(aSubject, aTopic, aData);
   }
   return rv;
 }
 
-NS_IMPL_ISUPPORTS(nsXULAlerts, nsIAlertsService, nsIAlertsDoNotDisturb, nsIAlertsIconURI)
+NS_IMPL_ISUPPORTS(nsXULAlerts, nsIAlertsService, nsIAlertsDoNotDisturb)
 
 /* static */ already_AddRefed<nsXULAlerts>
 nsXULAlerts::GetInstance()
 {
   if (!gXULAlerts) {
     gXULAlerts = new nsXULAlerts();
     ClearOnShutdown(&gXULAlerts);
   }
@@ -79,24 +79,16 @@ nsXULAlerts::ShowAlertNotification(const
   NS_ENSURE_SUCCESS(rv, rv);
   return ShowAlert(alert, aAlertListener);
 }
 
 NS_IMETHODIMP
 nsXULAlerts::ShowAlert(nsIAlertNotification* aAlert,
                        nsIObserver* aAlertListener)
 {
-  return ShowAlertWithIconURI(aAlert, aAlertListener, nullptr);
-}
-
-NS_IMETHODIMP
-nsXULAlerts::ShowAlertWithIconURI(nsIAlertNotification* aAlert,
-                                  nsIObserver* aAlertListener,
-                                  nsIURI* aIconURI)
-{
   bool inPrivateBrowsing;
   nsresult rv = aAlert->GetInPrivateBrowsing(&inPrivateBrowsing);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString cookie;
   rv = aAlert->GetCookie(cookie);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -243,27 +235,16 @@ nsXULAlerts::ShowAlertWithIconURI(nsIAle
   // The source contains the host and port of the site that sent the
   // notification. It is empty for system alerts.
   nsCOMPtr<nsISupportsString> scriptableAlertSource (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
   NS_ENSURE_TRUE(scriptableAlertSource, NS_ERROR_FAILURE);
   scriptableAlertSource->SetData(source);
   rv = argsArray->AppendElement(scriptableAlertSource);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCOMPtr<nsISupportsCString> scriptableIconURL (do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
-  NS_ENSURE_TRUE(scriptableIconURL, NS_ERROR_FAILURE);
-  if (aIconURI) {
-    nsAutoCString iconURL;
-    rv = aIconURI->GetSpec(iconURL);
-    NS_ENSURE_SUCCESS(rv, rv);
-    scriptableIconURL->SetData(iconURL);
-  }
-  rv = argsArray->AppendElement(scriptableIconURL);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   nsCOMPtr<mozIDOMWindowProxy> newWindow;
   nsAutoCString features("chrome,dialog=yes,titlebar=no,popup=yes");
   if (inPrivateBrowsing) {
     features.AppendLiteral(",private");
   }
   rv = wwatch->OpenWindow(nullptr, ALERT_CHROME_URL, "_blank", features.get(),
                           argsArray, getter_AddRefs(newWindow));
   NS_ENSURE_SUCCESS(rv, rv);
--- a/toolkit/components/alerts/nsXULAlerts.h
+++ b/toolkit/components/alerts/nsXULAlerts.h
@@ -8,22 +8,20 @@
 
 #include "nsHashKeys.h"
 #include "nsInterfaceHashtable.h"
 
 #include "mozIDOMWindow.h"
 #include "nsIObserver.h"
 
 class nsXULAlerts : public nsIAlertsService,
-                    public nsIAlertsDoNotDisturb,
-                    public nsIAlertsIconURI
+                    public nsIAlertsDoNotDisturb
 {
   friend class nsXULAlertObserver;
 public:
-  NS_DECL_NSIALERTSICONURI
   NS_DECL_NSIALERTSDONOTDISTURB
   NS_DECL_NSIALERTSSERVICE
   NS_DECL_ISUPPORTS
 
   nsXULAlerts()
   {
   }
 
--- a/toolkit/components/alerts/resources/content/alert.css
+++ b/toolkit/components/alerts/resources/content/alert.css
@@ -8,26 +8,20 @@
   animation-name: alert-animation;
 }
 
 #alertBox[animate]:not([clicked]):not([closing]):hover {
   animation-play-state: paused;
 }
 
 #alertBox:not([hasOrigin]) > box > #alertTextBox > #alertFooter,
-#alertBox:not([hasIcon]) > box > #alertIcon,
 #alertImage:not([src]) {
   display: none;
 }
 
-#alertTitleBox {
-  -moz-box-pack: center;
-  -moz-box-align: center;
-}
-
 .alertText {
   white-space: pre-wrap;
 }
 
 @keyframes alert-animation {
   to {
     visibility: hidden;
   }
--- a/toolkit/components/alerts/resources/content/alert.js
+++ b/toolkit/components/alerts/resources/content/alert.js
@@ -32,29 +32,19 @@ function prefillAlertInfo() {
   // arguments[3] --> is the text clickable?
   // arguments[4] --> the alert cookie to be passed back to the listener
   // arguments[5] --> the alert origin reported by the look and feel
   // arguments[6] --> bidi
   // arguments[7] --> lang
   // arguments[8] --> replaced alert window (nsIDOMWindow)
   // arguments[9] --> an optional callback listener (nsIObserver)
   // arguments[10] -> the nsIURI.hostPort of the origin, optional
-  // arguments[11] -> the alert icon URL, optional
 
   switch (window.arguments.length) {
     default:
-    case 12: {
-      if (window.arguments[11]) {
-        let alertBox = document.getElementById("alertBox");
-        alertBox.setAttribute("hasIcon", true);
-
-        let icon = document.getElementById("alertIcon");
-        icon.src = window.arguments[11];
-      }
-    }
     case 11: {
       if (window.arguments[10]) {
         let alertBox = document.getElementById("alertBox");
         alertBox.setAttribute("hasOrigin", true);
 
         let hostPort = window.arguments[10];
         const ALERT_BUNDLE = Services.strings.createBundle(
           "chrome://alerts/locale/alert.properties");
--- a/toolkit/components/alerts/resources/content/alert.xul
+++ b/toolkit/components/alerts/resources/content/alert.xul
@@ -20,17 +20,16 @@
         onload="onAlertLoad();"
         onclick="onAlertClick();"
         onbeforeunload="onAlertBeforeUnload();">
 
   <script type="application/javascript" src="chrome://global/content/alerts/alert.js"/>
 
   <vbox id="alertBox" class="alertBox">
     <box id="alertTitleBox">
-      <image id="alertIcon"/>
       <label id="alertTitleLabel" class="alertTitle plain" crop="end"/>
       <vbox class="alertCloseBox">
         <toolbarbutton class="alertCloseButton close-icon"
                        tooltiptext="&closeAlert.tooltip;"
                        onclick="event.stopPropagation();"
                        oncommand="onAlertClose();"/>
       </vbox>
     </box>
--- a/toolkit/themes/shared/alert-common.css
+++ b/toolkit/themes/shared/alert-common.css
@@ -48,32 +48,16 @@
 }
 
 @keyframes alert-closing-animation {
   to {
     opacity: 0;
   }
 }
 
-#alertIcon {
-  margin-top: 6px;
-  margin-inline-start: 8px;
-  margin-inline-end: 0;
-  margin-bottom: 0;
-  width: 16px;
-  min-height: 16px;
-  max-height: 16px;
-}
-
-@media (resolution: 2dppx) {
-  #alertIcon {
-    image-rendering: -moz-crisp-edges;
-  }
-}
-
 #alertImage {
   width: 80px;
   height: 80px;
   max-width: 80px;
   max-height: 80px;
   object-fit: scale-down;
   margin: 0 7px 7px;
 }