Bug 1392979 - Modernize buttons for Flash CTP r?felipe draft
authorDoug Thayer <dothayer@mozilla.com>
Tue, 29 Aug 2017 10:56:42 -0700
changeset 662662 2950b895ee4a302698b9b241479643efc9ec4cf3
parent 660738 37b95547f0d27565452136d16b2df2857be840f6
child 730939 88380cdeecd5581a61f8bb738acb413d7f3b595c
push id79157
push userbmo:dothayer@mozilla.com
push dateMon, 11 Sep 2017 23:18:43 +0000
reviewersfelipe
bugs1392979
milestone57.0a1
Bug 1392979 - Modernize buttons for Flash CTP r?felipe This is just the most conservative thing we can do to get the Flash doorhanger to not look out of place next to other doorhangers. This does not change the doorhanger's strings or anything substantive. Still looking into what that would entail, but I thought I would drop this in as a baseline. Minor notes: added default="true" to get the OS-specific button reordering of normal doorhangers, and removed the close button since the doorhanger will close by just clicking out of it. MozReview-Commit-ID: 9jhHLfzSeXZ
browser/base/content/urlbarBindings.xml
browser/themes/shared/plugin-doorhanger.inc.css
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -2689,27 +2689,25 @@ file, You can obtain one at http://mozil
                     "center-item-menulist").value = val;
         </setter>
       </property>
     </implementation>
   </binding>
 
   <binding id="click-to-play-plugins-notification" extends="chrome://global/content/bindings/notification.xml#popup-notification">
     <content align="start" style="width: &pluginNotification.width;;">
-      <xul:vbox flex="1" align="stretch" class="popup-notification-main-box"
+      <xul:vbox flex="1" align="stretch" class="click-to-play-plugins-notification-main-box"
                 xbl:inherits="popupid">
         <xul:hbox class="click-to-play-plugins-notification-description-box" flex="1" align="start">
           <xul:description class="click-to-play-plugins-outer-description" flex="1">
             <html:span anonid="click-to-play-plugins-notification-description" />
-            <xul:label class="text-link click-to-play-plugins-notification-link" anonid="click-to-play-plugins-notification-link" />
+            <html:br/>
+            <xul:label class="text-link click-to-play-plugins-notification-link popup-notification-learnmore-link"
+                       anonid="click-to-play-plugins-notification-link" />
           </xul:description>
-          <xul:toolbarbutton anonid="closebutton"
-                             class="messageCloseButton popup-notification-closebutton tabbable close-icon"
-                             xbl:inherits="oncommand=closebuttoncommand"
-                             tooltiptext="&closeNotification.tooltip;"/>
         </xul:hbox>
         <xul:grid anonid="click-to-play-plugins-notification-center-box"
                   class="click-to-play-plugins-notification-center-box">
           <xul:columns>
             <xul:column flex="1"/>
             <xul:column/>
           </xul:columns>
           <xul:rows>
@@ -2721,21 +2719,22 @@ file, You can obtain one at http://mozil
                           oncommand="document.getBindingParent(this)._setState(2)"/>
             </xul:hbox>
           </xul:rows>
         </xul:grid>
         <xul:hbox anonid="button-container"
                   class="click-to-play-plugins-notification-button-container"
                   pack="center" align="center">
           <xul:button anonid="primarybutton"
-                      class="click-to-play-popup-button"
+                      class="click-to-play-popup-button popup-notification-button"
                       oncommand="document.getBindingParent(this)._onButton(this)"
                       flex="1"/>
           <xul:button anonid="secondarybutton"
-                      class="click-to-play-popup-button"
+                      default="true"
+                      class="click-to-play-popup-button popup-notification-button"
                       oncommand="document.getBindingParent(this)._onButton(this);"
                       flex="1"/>
         </xul:hbox>
         <xul:box hidden="true">
           <children/>
         </xul:box>
       </xul:vbox>
     </content>
--- a/browser/themes/shared/plugin-doorhanger.inc.css
+++ b/browser/themes/shared/plugin-doorhanger.inc.css
@@ -22,19 +22,18 @@
   background-repeat: no-repeat;
   width: 16px;
   height: 15px;
   margin-inline-start: 6px;
 }
 
 .click-to-play-plugins-notification-button-container {
   background-color: var(--arrowpanel-dimmed);
-  border-top: 1px solid var(--panel-separator-color);
-  padding: 10px;
   margin-top: 5px;
+  display: flex;
 }
 
 .click-to-play-popup-button {
   width: 50%;
 }
 
 .click-to-play-plugins-notification-description-box {
   padding: 10px;
@@ -44,16 +43,20 @@
   margin-top: 8px;
 }
 
 .click-to-play-plugins-notification-link,
 .center-item-link {
   margin: 0;
 }
 
+.click-to-play-plugins-notification-main-box {
+  width: 100%;
+}
+
 .messageImage[value="plugin-hidden"] {
   list-style-image: url(chrome://browser/skin/notification-icons/plugin.svg);
 }
 
 /* Keep any changes to this style in sync with pluginProblem.css */
 notification.pluginVulnerable {
   background-color: rgb(72,72,72);
   background-image: url(chrome://mozapps/skin/plugins/contentPluginStripe.png);