Bug 1559601 - Apply the 'brighttext' attribute to the <hbox> toolbars. r=darktrojan
authorRichard Marti <richard.marti@gmail.com>
Tue, 18 Jun 2019 22:29:56 +0200
changeset 35894 252ff46d7f01b00c53f758130347de18536c3804
parent 35893 3a3901fff903bd544059fb8dbc2a37b387fae827
child 35895 2dc0ef5baee8732db136ce62d75413bf005b068b
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersdarktrojan
bugs1559601
Bug 1559601 - Apply the 'brighttext' attribute to the <hbox> toolbars. r=darktrojan
calendar/base/content/calendar-task-view.xul
calendar/lightning/themes/linux/lightning.css
calendar/lightning/themes/osx/lightning.css
calendar/lightning/themes/windows/lightning.css
mail/base/content/messenger.xul
mail/base/content/msgAttachmentView.inc.xul
mail/base/content/msgHdrView.inc.xul
mail/base/content/multimessageview.xhtml
mail/base/content/toolbarIconColor.js
mail/themes/linux/mail/messageHeader.css
mail/themes/linux/mail/messenger.css
mail/themes/windows/mail/messenger.css
--- a/calendar/base/content/calendar-task-view.xul
+++ b/calendar/base/content/calendar-task-view.xul
@@ -97,17 +97,17 @@
                     <label id="calendar-task-details-priority-high"
                            value="&calendar.task-details.priority.high.label;"
                            class="task-details-value"
                            crop="end"
                            flex="1"
                            hidden="true"/>
                     <hbox id="other-actions-box" align="end" flex="1" pack="end">
                       <vbox id="task-actions-toolbox">
-                        <hbox id="task-actions-toolbar">
+                        <hbox id="task-actions-toolbar" class="toolbar">
                           <toolbarbutton id="task-actions-category"
                                          type="menu"
                                          label="&calendar.unifinder.tree.categories.label;"
                                          tooltiptext="&calendar.task.category.button.tooltip;"
                                          command="calendar_task_category_command"
                                          observes="calendar_task_category_command"
                                          class="toolbarbutton-1 msgHeaderView-button">
                               <menupopup id="task-actions-category-popup"
--- a/calendar/lightning/themes/linux/lightning.css
+++ b/calendar/lightning/themes/linux/lightning.css
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 @import url(chrome://lightning-common/skin/lightning.css);
 
 .lightning-notification-bar {
   background-color: #baeeff;
-  color: -moz-dialogtext;
+  color: #000;
   border-bottom: 1px solid ThreeDDarkShadow;
   padding: 3px;
 }
 
 #calendarContent {
   color: -moz-DialogText;
   background-color: -moz-Dialog;
 }
@@ -62,16 +62,20 @@
 #calendar-status-todaypane-button > .toolbarbutton-text {
   margin: 0 0 1px !important;
 }
 
 #calMinimonthBox {
     margin-top: 3px;
 }
 
+#imip-view-toolbar {
+  color: -moz-dialogText;
+}
+
 /* ::: imip button icons ::: */
 #imip-view-toolbar > .toolbarbutton-1.msgHeaderView-button {
   background-color: -moz-dialog;
 }
 
 #imip-view-toolbar > .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-button,
 #imip-view-toolbar > .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-dropmarker {
   background-color: transparent;
--- a/calendar/lightning/themes/osx/lightning.css
+++ b/calendar/lightning/themes/osx/lightning.css
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 @import url(chrome://lightning-common/skin/lightning.css);
 
 .lightning-notification-bar {
     background-color: #baeeff;
     padding: 6px 8px;
-    color: -moz-dialogtext;
+    color: #000;
 }
 
 #calendarContent:-moz-lwtheme {
     color: -moz-dialogText;
     text-shadow: none;
 }
 
 /* Calendar list rules */
--- a/calendar/lightning/themes/windows/lightning.css
+++ b/calendar/lightning/themes/windows/lightning.css
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 @import url(chrome://lightning-common/skin/lightning.css);
 
 .lightning-notification-bar {
     background-color: #baeeff;
-    color: -moz-dialogtext;
+    color: #000;
     border-bottom: 1px solid ThreeDDarkShadow;
     padding: 3px;
 }
 
 #calendarContent {
     color: -moz-DialogText;
     background-color: -moz-Dialog;
 }
@@ -67,16 +67,20 @@
   margin-inline-start: -5px;
   position: relative;
 }
 
 #today-splitter.calendar-sidebar-splitter:-moz-lwtheme {
   background-image: none;
 }
 
+#imip-view-toolbar {
+  color: -moz-dialogText;
+}
+
 @media (-moz-windows-default-theme) {
   #imip-view-toolbar > .toolbarbutton-1.msgHeaderView-button,
   #imip-view-toolbar > .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-button,
   #imip-view-toolbar > .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-dropmarker {
     border-color: var(--toolbarbutton-active-bordercolor);
     background-image: linear-gradient(-moz-dialog, -moz-dialog);
   }
 
--- a/mail/base/content/messenger.xul
+++ b/mail/base/content/messenger.xul
@@ -474,17 +474,17 @@
           <!-- mail-toolbox with the main toolbarbuttons -->
 #include mainMailToolbox.inc.xul
 
           <box id="messengerBox" orient="horizontal" flex="1" minheight="100" height="100" persist="height">
             <vbox id="folderPaneBox" minwidth="125" width="200" persist="width">
               <sidebarheader id="folderPaneHeader" hidden="true" align="center"/>
               <vbox id="folderPane-toolbox">
                 <hbox id="folderPane-toolbar"
-                      class="inline-toolbar"
+                      class="inline-toolbar toolbar"
                       toolboxid="mail-toolbox"
                       toolbarname="&folderPaneBar.label;"
                       accesskey="&folderPaneBar.accesskey;"
                       context="toolbar-context-menu"
                       collapsed="true">
                   <toolbaritem id="folderpane-mode-selector"
                                flex="1">
                     <menulist id="folderpane-mode-selector-menulist"
--- a/mail/base/content/msgAttachmentView.inc.xul
+++ b/mail/base/content/msgAttachmentView.inc.xul
@@ -24,16 +24,17 @@
                           </hbox>
                           <!-- Use a very large flex value here so that attachmentCount doesn't take
                                up more space than necessary, but still crops itself if there's not
                                enough space. -->
                           <spacer flex="9999"/>
 
                           <vbox id="attachment-view-toolbox" class="inline-toolbox">
                             <hbox id="attachment-view-toolbar"
+                                  class="toolbar"
                                   context="attachment-toolbar-context-menu">
                               <toolbaritem id="attachmentSaveAll"
                                            title="&saveAllAttachmentsButton1.label;">
                                 <toolbarbutton is="toolbarbutton-menu-button" id="attachmentSaveAllSingle"
                                                type="menu-button"
                                                class="toolbarbutton-1 msgHeaderView-button"
                                                label="&saveAttachmentButton1.label;"
                                                tooltiptext="&saveAttachmentButton1.tooltip;"
--- a/mail/base/content/msgHdrView.inc.xul
+++ b/mail/base/content/msgHdrView.inc.xul
@@ -14,17 +14,17 @@
 
                               <!-- This hbox has display:block set to imbue it with the HTML layout
                                    model. This lets us float the message header toolbar to the right
                                    so we don't waste space when the From field and the toolbar could
                                    fit alongside each other. -->
                               <hbox id="expandedHeadersTopBox" flex="1">
 
                                 <vbox id="header-view-toolbox" class="inline-toolbox">
-                                  <hbox id="header-view-toolbar">
+                                  <hbox id="header-view-toolbar" class="toolbar">
                                     <!-- XXXdmose need to move these commands to a controller, either
                                          on the header view, the message pane, or the default
                                          controller -->
 
                                     <!-- XXXdmose need to audit our shortcut/a11y setup and make sure
                                          these buttons are doing the right thing -->
 
                                     <toolbarbutton id="hdrReplyToSenderButton" label="&hdrReplyButton1.label;"
--- a/mail/base/content/multimessageview.xhtml
+++ b/mail/base/content/multimessageview.xhtml
@@ -30,17 +30,17 @@
           href="chrome://messenger/content/multimessageview_print.css"/>
     <title>&window.title;</title>
     <script src="chrome://messenger/content/multimessageview.js"/>
   </head>
   <body>
     <div id="heading_wrapper">
       <vbox id="header-view-toolbox" class="inline-toolbox"
             xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-        <hbox id="header-view-toolbar">
+        <hbox id="header-view-toolbar" class="toolbar">
           <toolbarbutton id="hdrArchiveButton"
                          class="toolbarbutton-1 msgHeaderView-button hdrArchiveButton"
                          label="&archiveButton.label;"
                          onclick="if (event.button == 0) window.top.MsgArchiveSelectedMessages(null);" />
           <toolbarbutton id="hdrTrashButton"
                          class="toolbarbutton-1 msgHeaderView-button hdrTrashButton"
                          label="&deleteButton.label;"
                          onclick="if (event.button == 0) window.top.DefaultController.doCommand('cmd_delete');"/>
--- a/mail/base/content/toolbarIconColor.js
+++ b/mail/base/content/toolbarIconColor.js
@@ -58,16 +58,17 @@ var ToolbarIconColor = {
       rgb.shift();
       return rgb.map(x => parseInt(x));
     }
 
     let toolbarSelector = "toolbox > toolbar:not([collapsed=true])";
     if (AppConstants.platform == "macosx") {
       toolbarSelector += ":not([type=menubar])";
     }
+    toolbarSelector += ", .toolbar";
 
     for (let toolbar of document.querySelectorAll(toolbarSelector)) {
       let [r, g, b] = parseRGB(getComputedStyle(toolbar).color);
       let luminance = 0.2125 * r + 0.7154 * g + 0.0721 * b;
       if (luminance <= 110)
         toolbar.removeAttribute("brighttext");
       else
         toolbar.setAttribute("brighttext", "true");
--- a/mail/themes/linux/mail/messageHeader.css
+++ b/mail/themes/linux/mail/messageHeader.css
@@ -120,28 +120,28 @@
   margin-inline-start: 2px;
   vertical-align: middle;
   min-width: 28px;
   padding-top: 0;
   padding-bottom: 0;
   list-style-image: none; /* overrides the rule from primaryToolbar.css */
 }
 
-.toolbarbutton-1.msgHeaderView-button,
+.toolbarbutton-1.msgHeaderView-button:not([type="menu-button"]),
 .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-button,
 .toolbarbutton-1.msgHeaderView-button > .toolbarbutton-menubutton-dropmarker {
   background: var(--toolbarbutton-hover-background);
   border-color: var(--toolbarbutton-header-bordercolor);
 }
 
 .toolbarbutton-1.msgHeaderView-button:not([disabled=true]):-moz-any(:hover,[open]) >
 .toolbarbutton-menubutton-button,
 .toolbarbutton-1.msgHeaderView-button:not([disabled=true]):-moz-any(:hover,[open]) >
 .toolbarbutton-menubutton-dropmarker,
-.toolbarbutton-1.msgHeaderView-button:not([disabled=true]):not([checked=true]):not([open]):not(:active):hover,
+.toolbarbutton-1.msgHeaderView-button:not([type="menu-button"]):not([disabled=true]):not([checked=true]):not([open]):not(:active):hover,
 .toolbarbutton-1.msgHeaderView-button:not([buttonover]):not([open]):not(:active):hover >
 .toolbarbutton-menubutton-dropmarker:not([disabled]) {
   background: var(--toolbarbutton-active-background);
   border-color: var(--toolbarbutton-active-bordercolor);
 }
 
 /* For unclear reasons, toolkit's toolbarbutton.css forces a margin of 0,
  * jamming the image up against the text, so we need this !important
--- a/mail/themes/linux/mail/messenger.css
+++ b/mail/themes/linux/mail/messenger.css
@@ -87,25 +87,25 @@ toolbar[brighttext] {
 
   --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background, rgba(0, 0, 0, .15));
   --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background, rgba(0, 0, 0, .15));
   --toolbarbutton-active-boxshadow: 0 0 0 1px var(--lwt-toolbarbutton-active-background, rgba(0, 0, 0, .15)) inset;
 
   --toolbarbutton-checkedhover-backgroundcolor: var(--lwt-toolbarbutton-hover-background, rgba(0, 0, 0, .2));
 }
 
+.toolbar[brighttext],
 .contentTabToolbox[brighttext],
 #header-view-toolbar[brighttext],
 #ab-toolbox > toolbar[brighttext],
 .mail-toolbox > toolbar[brighttext],
 #event-toolbox > toolbar[brighttext],
 #compose-toolbox > toolbar[brighttext],
 #headers-box > toolbar[brighttext],
-#FormatToolbox > toolbar[brighttext],
-:root[lwt-tree-brighttext] #folderPane-toolbar {
+#FormatToolbox > toolbar[brighttext] {
   --toolbarbutton-hover-background: var(--lwt-toolbarbutton-hover-background, rgba(255, 255, 255, .25));
   --toolbarbutton-hover-bordercolor: var(--lwt-toolbarbutton-hover-background, rgba(255, 255, 255, .5));
   --toolbarbutton-header-bordercolor: var(--lwt-toolbarbutton-hover-background, rgba(255, 255, 255, .25));
 
   --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background, rgba(255, 255, 255, .4));
   --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background, rgba(255, 255, 255, .7));
   --toolbarbutton-active-boxshadow: 0 0 0 1px var(--lwt-toolbarbutton-active-background, rgba(255, 255, 255, .4)) inset;
 
--- a/mail/themes/windows/mail/messenger.css
+++ b/mail/themes/windows/mail/messenger.css
@@ -112,24 +112,24 @@ toolbar[brighttext] {
 
   --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background, rgba(0, 0, 0, .15));
   --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background, rgba(0, 0, 0, .15));
   --toolbarbutton-active-boxshadow: 0 0 0 1px var(--lwt-toolbarbutton-active-background, rgba(0, 0, 0, .15)) inset;
 
   --toolbarbutton-checkedhover-backgroundcolor: var(--lwt-toolbarbutton-hover-background, rgba(0, 0, 0, .2));
 }
 
+.toolbar[brighttext],
 .contentTabToolbox[brighttext],
 #header-view-toolbar[brighttext],
 #ab-toolbox > toolbar[brighttext],
 .mail-toolbox > toolbar[brighttext],
 #event-toolbox > toolbar[brighttext],
 #compose-toolbox > toolbar[brighttext],
-#navigation-toolbox > toolbar[brighttext],
-:root[lwt-tree-brighttext] #folderPane-toolbar {
+#navigation-toolbox > toolbar[brighttext] {
   --toolbarbutton-hover-background: var(--lwt-toolbarbutton-hover-background, rgba(255, 255, 255, .25));
   --toolbarbutton-hover-bordercolor: var(--lwt-toolbarbutton-hover-background, rgba(255, 255, 255, .5));
   --toolbarbutton-header-bordercolor: var(--lwt-toolbarbutton-hover-background, rgba(255, 255, 255, .25));
 
   --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background, rgba(255, 255, 255, .4));
   --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background, rgba(255, 255, 255, .7));
   --toolbarbutton-active-boxshadow: 0 0 0 1px var(--lwt-toolbarbutton-active-background, rgba(255, 255, 255, .4)) inset;