Bug 1484653 - Remove modehbox and modevbox bindings. r=philipp
authorArshad Khan <arshdkhn1@gmail.com>
Mon, 20 Aug 2018 15:22:27 +0530
changeset 33126 b2f73a356bde87b73610025998cc86b3ec663633
parent 33125 f3074ef87698689535c5a0a158fd871fdac58672
child 33127 11615766cf8a256fd8aab602119a9d1d55f194d3
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersphilipp
bugs1484653
Bug 1484653 - Remove modehbox and modevbox bindings. r=philipp
calendar/base/content/today-pane.xul
calendar/base/content/widgets/calendar-widget-bindings.css
calendar/base/content/widgets/calendar-widgets.xml
--- a/calendar/base/content/today-pane.xul
+++ b/calendar/base/content/today-pane.xul
@@ -26,26 +26,26 @@
 
     <modevbox id="today-pane-panel"
               mode="mail,calendar,task" modewidths="200,200,200" modesplitterstates="open,open,open"
               refcontrol="calendar_toggle_todaypane_command"
               broadcaster="modeBroadcaster" persist="modewidths">
       <sidebarheader align="center">
         <label id ="today-pane-header"/>
         <spacer flex="1"/>
-        <modehbox mode="mail,calendar" broadcaster="modeBroadcaster">
+        <modebox mode="mail,calendar" broadcaster="modeBroadcaster">
           <toolbarbutton id="today-pane-cycler-prev"
                          dir="prev"
                          class="today-pane-cycler"
                          oncommand="TodayPane.cyclePaneView(-1);"/>
           <toolbarbutton id="today-pane-cycler-next"
                          dir="next"
                          class="today-pane-cycler"
                          oncommand="TodayPane.cyclePaneView(1);"/>
-        </modehbox>
+        </modebox>
         <spacer id="buttonspacer"/>
         <toolbarbutton id="today-closer" class="today-closebutton close-icon"
                        oncommand="document.getElementById('today-pane-panel').setVisible(false, true, true);
                                   TodayPane.setTodayHeader();
                                   TodayPane.updateSplitterState();"/>
       </sidebarheader>
       <vbox flex="1">
         <modevbox id="agenda-panel"
@@ -55,26 +55,26 @@
                   persist="collapsed height collapsedinmodes"
                   broadcaster="modeBroadcaster">
               <modebox id="today-none-box"
                        mode="mail,calendar,task"
                        collapsedinmodes="mail,calendar,task"
                        broadcaster="modeBroadcaster"
                        refcontrol="ltnTodayPaneDisplayNone"
                        persist="collapsedinmodes"/>
-              <modehbox id="today-minimonth-box"
+              <modebox id="today-minimonth-box"
                         pack="center"
                         class="today-subpane"
                         mode="mail,calendar,task"
                         broadcaster="modeBroadcaster"
                         collapsedinmodes="mail,calendar,task"
                         refcontrol="ltnTodayPaneDisplayMinimonth"
                         persist="collapsedinmodes">
                 <minimonth id="today-Minimonth" freebusy="true" onchange="TodayPane.setDaywithjsDate(this.value);"/>
-              </modehbox>
+              </modebox>
               <modebox id="mini-day-box"
                        mode="mail,calendar,task"
                        class="today-subpane"
                        refcontrol="ltnTodayPaneDisplayMiniday"
                        broadcaster="modeBroadcaster"
                        collapsedinmodes=""
                        persist="collapsedinmodes"
                        onDOMMouseScroll="TodayPane.advance(event.detail > 0 ? 1 : -1);">
--- a/calendar/base/content/widgets/calendar-widget-bindings.css
+++ b/calendar/base/content/widgets/calendar-widget-bindings.css
@@ -1,29 +1,24 @@
 /* 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/. */
 
 treenode-checkbox {
   -moz-binding: url("chrome://calendar/content/widgets/calendar-widgets.xml#treenode-checkbox");
 }
 
-modebox {
+modebox,
+modevbox {
   -moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#modebox);
   -moz-user-focus: normal;
 }
 
 modevbox {
-  -moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#modevbox);
-  -moz-user-focus: normal;
-}
-
-modehbox {
-  -moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#modehbox);
-  -moz-user-focus: normal;
+  -moz-box-orient: vertical;
 }
 
 toolbarbutton[doubleimage="true"] {
   -moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#doubleimage-toolbarbutton);
 }
 
 toolbarbutton[todaypane="true"] {
   -moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#todaypane-toolbarbutton);
--- a/calendar/base/content/widgets/calendar-widgets.xml
+++ b/calendar/base/content/widgets/calendar-widgets.xml
@@ -47,36 +47,16 @@
       </method>
     </implementation>
    </binding>
 
   <!-- this binding directly extends to a checkbox but is visualized as
        a treenode in a treecontrol-->
   <binding id="treenode-checkbox" extends="chrome://global/content/bindings/checkbox.xml#checkbox"/>
 
-  <!-- this binding directly extends to a xul:box element and automatically
-       sets the "orient" attribute to "vertical" thus behaving like a vbox-->
-  <binding id="modevbox" extends="chrome://calendar/content/widgets/calendar-widgets.xml#modebox">
-    <implementation>
-      <constructor><![CDATA[
-          this.setAttribute("orient", "vertical");
-      ]]></constructor>
-    </implementation>
-  </binding>
-
-  <!-- this binding directly extends to a xul:box element and automatically
-       sets the "orient" attribute to "horizontal" thus behaving like a vbox-->
-  <binding id="modehbox" extends="chrome://calendar/content/widgets/calendar-widgets.xml#modebox">
-    <implementation>
-      <constructor><![CDATA[
-          this.setAttribute("orient", "horizontal");
-      ]]></constructor>
-    </implementation>
-  </binding>
-
   <!-- this binding directly extends to a xul:box element and enriches this with some functionality: It is designed
       to be displayed only 1) in given application modes (e.g "task" mode, "calendar" mode) and 2) only in relation
       to the "checked" attribute of command or a checkbox control.
     - The attribute "mode" denotes a coma-separated list of all modes that the binding should not be collapsed in,
       e.g. mode="calendar,task"
     - The attribute "broadcaster" points to the id of a broadcaster that is supposed to be notified (by the application)
       as soon as the mode changes. When this happens the modebox" will be notified and will check if it should
       collapse itself or not.