Bug 1509194 - Convert calendar view selection tabs to radios; rs=bustage-fix
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 22 Nov 2018 19:09:27 +1300
changeset 33755 b5146b7bfd61c4d2fba81f2890b5bf60653c1c86
parent 33754 601a4bad47a152d738a6fed92ae56933962dfe87
child 33756 781b3615a3ed77074a585e3910a6bb01a592b000
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersbustage-fix
bugs1509194
Bug 1509194 - Convert calendar view selection tabs to radios; rs=bustage-fix
calendar/base/content/calendar-views.xul
calendar/base/content/widgets/calendar-widget-bindings.css
calendar/base/content/widgets/calendar-widgets.xml
calendar/base/themes/common/calendar-views.css
calendar/base/themes/linux/calendar-views.css
calendar/base/themes/osx/calendar-views.css
calendar/base/themes/windows/calendar-views.css
mail/test/mozmill/runtest.py
--- a/calendar/base/content/calendar-views.xul
+++ b/calendar/base/content/calendar-views.xul
@@ -57,43 +57,44 @@
                   <spacer flex="1"/>
                   <label id="calendarWeek"
                          class="view-header"
                          type="end"
                          crop="start"/>
                </hbox>
             <hbox flex="1" class="navigation-bottombox"/>
          </vbox>
-         <tabbox id="view-tabbox" pack="end">
-            <tabs id="view-tabs"
+         <hbox id="view-tabbox" pack="end">
+            <radiogroup id="view-tabs"
                    class="calview-tabs"
+                   orient="horizontal"
                    setfocus="true">
-               <tab id="calendar-day-view-button"
+               <radio id="calendar-day-view-button"
                     label="&calendar.day.button.label;"
                     tooltiptext="&calendar.day.button.tooltip;"
                     calview="day"
                     observes="calendar_day-view_command"/>
-               <tab id="calendar-week-view-button"
+               <radio id="calendar-week-view-button"
                     label="&calendar.week.button.label;"
                     tooltiptext="&calendar.week.button.tooltip;"
                     calview="week"
                     observes="calendar_week-view_command"/>
-               <tab id="calendar-multiweek-view-button"
+               <radio id="calendar-multiweek-view-button"
                     label="&calendar.multiweek.button.label;"
                     tooltiptext="&calendar.multiweek.button.tooltip;"
                     calview="multiweek"
                     observes="calendar_multiweek-view_command"/>
-               <tab id="calendar-month-view-button"
+               <radio id="calendar-month-view-button"
                     label="&calendar.month.button.label;"
                     tooltiptext="&calendar.month.button.tooltip;"
                     calview="month"
                     observes="calendar_month-view_command"/>
-            </tabs>
+            </radiogroup>
             <box class="navigation-bottombox"/>
-         </tabbox>
+         </hbox>
          <vbox>
            <vbox flex="1" class="navigation-spacer-box"/>
            <hbox class="navigation-bottombox"/>
          </vbox>
        </hbox>
        <deck flex="1"
             id="view-deck"
             persist="selectedIndex">
--- a/calendar/base/content/widgets/calendar-widget-bindings.css
+++ b/calendar/base/content/widgets/calendar-widget-bindings.css
@@ -32,17 +32,17 @@ minimonth-header {
 minimonth-header[readonly="true"] {
   -moz-binding: url("chrome://calendar/content/widgets/minimonth.xml#minimonth-header");
 }
 
 dragndropContainer {
    -moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#dragndropContainer);
 }
 
-tab[calview] {
+radio[calview] {
    -moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#view-tab);
 }
 
 calendar-list-tree {
    -moz-binding: url(chrome://calendar/content/widgets/calendar-list-tree.xml#calendar-list-tree);
 }
 
 calendar-list-tree[type="full"] {
--- a/calendar/base/content/widgets/calendar-widgets.xml
+++ b/calendar/base/content/widgets/calendar-widgets.xml
@@ -469,17 +469,17 @@
       ]]></handler>
 
       <handler event="dragend"><![CDATA[
           currentView().removeDropShadows();
       ]]></handler>
     </handlers>
   </binding>
 
-  <binding id="view-tab" extends="chrome://global/content/bindings/tabbox.xml#tab">
+  <binding id="view-tab">
     <content>
       <xul:hbox class="tab-middle box-inherit" xbl:inherits="align,dir,pack,orient,selected" flex="1">
         <xul:image class="tab-icon" xbl:inherits="validate,src=image"/>
         <xul:stack>
           <xul:label class="tab-text unselected-text"
                      xbl:inherits="value=label,accesskey,crop,disabled,selected"
                      flex="1"/>
           <xul:label class="tab-text selected-text"
--- a/calendar/base/themes/common/calendar-views.css
+++ b/calendar/base/themes/common/calendar-views.css
@@ -891,47 +891,50 @@ agenda-richlist-item[status="CANCELLED"]
     border-bottom: 1px solid var(--calview-border-bottom-color);
 }
 
 .navigation-spacer-box {
     min-width: 15px;
     border-bottom: 1px solid var(--calview-border-bottom-color);
 }
 
-tab[calview] {
-    -moz-appearance: none;
+radio[calview] {
     border-left: 1px solid var(--calview-border-color);
     border-right: 1px solid var(--calview-border-color);
     border-bottom: 1px solid var(--calview-border-bottom-color);
     border-top-left-radius: 0;
     border-top-right-radius: 0;
     margin-top: 0;
     padding: 3px 6px;
     -moz-user-focus: normal;
     background-color: transparent;
     font-size: 14px;
+
+    position: relative;
+    -moz-appearance: tab;
+    min-width: unset;
 }
 
-tab[calview]:not(:first-child) {
+radio[calview]:not(:first-child) {
     margin-inline-start: -1px;
 }
 
 
-tab[calview][selected="true"] {
+radio[calview][selected="true"] {
     background-image: linear-gradient(to bottom,
                       var(--calview-tabline-color) 2px, transparent 2px);
     border-bottom-width: 0;
     padding-bottom: 4px;
 }
 
-tab[calview]:not([selected=true]):hover {
+radio[calview]:not([selected=true]):hover {
     background-color: rgba(0,0,0,.1);
 }
 
-tab[calview] > .tab-middle {
+radio[calview] > .tab-middle {
     text-align: center;
 }
 
 .view-header {
     font-weight: normal;
     font-size: 14px;
     color: ButtonText;
 }
--- a/calendar/base/themes/linux/calendar-views.css
+++ b/calendar/base/themes/linux/calendar-views.css
@@ -16,26 +16,26 @@
     background-color: -moz-Field;
     border-width: 0 0 1px 1px;
 }
 
 .navigation-inner-box {
     padding-top: 1px;
 }
 
-tab[calview] {
+radio[calview] {
     color: ButtonText;
     margin-bottom: 0;
 }
 
-tab[calview][selected="true"] {
+radio[calview][selected="true"] {
     background-color: -moz-Field;
 }
 
-tab[calview] > .tab-middle {
+radio[calview] > .tab-middle {
     margin-top: 3px;
     margin-bottom: 3px;
 }
 
 .navigation-bottombox {
     background-color: -moz-Field;
 }
 
--- a/calendar/base/themes/osx/calendar-views.css
+++ b/calendar/base/themes/osx/calendar-views.css
@@ -67,27 +67,27 @@ agenda-richlist-item[status="CANCELLED"]
 .calview-tabs {
     -moz-box-align: stretch;
     padding-left: 0;
     padding-right: 0;
     margin-bottom: 0;
     position: static;
 }
 
-tab[calview] {
+radio[calview] {
     color: #2e4e73;
     padding-top: 4px;
 }
 
-tab[calview][selected="true"] {
+radio[calview][selected="true"] {
     background-color: #fff;
     color: inherit;
 }
 
-tab[calview] > .tab-middle {
+radio[calview] > .tab-middle {
     padding: 0;
 }
 
 .view-header {
     margin-top: 3px;
     margin-bottom: 1px;
 }
 
--- a/calendar/base/themes/windows/calendar-views.css
+++ b/calendar/base/themes/windows/calendar-views.css
@@ -18,21 +18,21 @@
     border-width: 0;
     border-inline-start: 1px;
 }
 
 .view-header {
     margin-bottom: 0;
 }
 
-tab[calview] {
+radio[calview] {
     color: ButtonText;
 }
 
-tab[calview][selected="true"] {
+radio[calview][selected="true"] {
     background-color: -moz-Field;
 }
 
 .navigation-inner-box > hbox {
     padding-top: 1px;
 }
 
 .navigation-bottombox {
--- a/mail/test/mozmill/runtest.py
+++ b/mail/test/mozmill/runtest.py
@@ -26,17 +26,17 @@ except ImportError:
 SCRIPT_DIRECTORY = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0])))
 sys.path.append(SCRIPT_DIRECTORY)
 
 import mozcrash
 
 from time import sleep
 import imp
 
-PROFILE_DIR = os.path.join(SCRIPT_DIRECTORY, 'mozmillprofile')
+PROFILE_DIR = os.path.join('/dev/shm', 'mozmillprofile')
 SYMBOLS_PATH = None
 PLUGINS_PATH = None
 # XXX This breaks any semblance of test runner modularity, and only works
 # because we know that we run MozMill only once per process. This needs to be
 # fixed if that ever changes.
 TEST_NAME = None
 TESTING_MODULES_DIR = None