Bug 1636667 - Add a <vbox> around message-body, splitter and attachment-pane to separate them from the other <hbox>. r=aleca DONTBUILD
authorRichard Marti <richard.marti@gmail.com>
Fri, 15 May 2020 13:56:34 +0300
changeset 39157 1fcf2af4ad4391975b42f66d6009cb3c19c1ccfe
parent 39156 8570a1102c50b4d562aaf85da4c38d39ae6c311f
child 39158 b8d9cd134ff9e3a24c277feff914656ed80f526b
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersaleca
bugs1636667
Bug 1636667 - Add a <vbox> around message-body, splitter and attachment-pane to separate them from the other <hbox>. r=aleca DONTBUILD Without this separation, moving the splitter added height attributes to other <hbox> that shouldn't get them.
mail/base/content/messenger.xhtml
mail/base/content/msgAttachmentView.inc.xhtml
--- a/mail/base/content/messenger.xhtml
+++ b/mail/base/content/messenger.xhtml
@@ -741,44 +741,46 @@
 #include msgOpenPGPKey.inc.xhtml
 #endif
                       <!-- The msgNotificationBar appears on top of the message
                            and displays information like: junk, contains remote
                            images, or is a suspected phishing URL. -->
                       <hbox id="mail-notification-top">
                         <!-- notificationbox will be added here lazily. -->
                       </hbox>
-                      <!-- The messagepanewrapper hbox exists to allow
-                           extensions to add sidebars to the message. -->
-                      <hbox id="messagepanewrapper" flex="1">
-                        <stack flex="1">
-                          <browser id="messagepane"
-                                   context="mailContext"
-                                   datetimepicker="DateTimePickerPanel"
-                                   autofind="false"
-                                   style="min-height:1px;"
-                                   flex="1"
-                                   name="messagepane"
-                                   tooltip="aHTMLTooltip"
-                                   disablehistory="true"
-                                   type="content"
-                                   primary="true"
-                                   src="about:blank"
-                                   disablesecurity="true"
-                                   messagemanagergroup="browsers"
-                                   onclick="return contentAreaClick(event);"
-                                   oncontextmenu="return mailContextOnContextMenu(event);"
-                                   onresize="return messagePaneOnResize(event);"/>
-                        </stack>
-                      </hbox>
-                      <splitter id="attachment-splitter" collapse="after"
-                                resizebefore="closest" resizeafter="closest"
-                                collapsed="true"/>
-                      <vbox id="attachmentView" collapsed="true">
+                      <vbox flex="1">
+                        <!-- The messagepanewrapper hbox exists to allow
+                             extensions to add sidebars to the message. -->
+                        <hbox id="messagepanewrapper" flex="1">
+                          <stack flex="1">
+                            <browser id="messagepane"
+                                     context="mailContext"
+                                     datetimepicker="DateTimePickerPanel"
+                                     autofind="false"
+                                     style="min-height:1px;"
+                                     flex="1"
+                                     name="messagepane"
+                                     tooltip="aHTMLTooltip"
+                                     disablehistory="true"
+                                     type="content"
+                                     primary="true"
+                                     src="about:blank"
+                                     disablesecurity="true"
+                                     messagemanagergroup="browsers"
+                                     onclick="return contentAreaClick(event);"
+                                     oncontextmenu="return mailContextOnContextMenu(event);"
+                                     onresize="return messagePaneOnResize(event);"/>
+                          </stack>
+                        </hbox>
+                        <splitter id="attachment-splitter" collapse="after"
+                                  resizebefore="closest" resizeafter="closest"
+                                  collapsed="true"/>
+                        <vbox id="attachmentView" collapsed="true">
 #include msgAttachmentView.inc.xhtml
+                        </vbox>
                       </vbox>
                       <findbar id="FindToolbar" browserid="messagepane"/>
                     </vbox>
                   </vbox>
                 </hbox>
                 <hbox id="messenger-notification-footer">
                   <!-- notificationbox will be added here lazily. -->
                 </hbox>
--- a/mail/base/content/msgAttachmentView.inc.xhtml
+++ b/mail/base/content/msgAttachmentView.inc.xhtml
@@ -1,107 +1,107 @@
 # 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/.
 
-<!-- the message pane consists of 4 'boxes'. Box #4 is the attachment box which
-     can be toggled into a slim or an expanded view -->
-                        <hbox align="center" id="attachmentBar"
-                              context="attachment-toolbar-context-menu"
-                              onclick="if (event.button == 0) { toggleAttachmentList(undefined, true); }">
-                          <button type="checkbox" id="attachmentToggle"
-                                  onmousedown="event.preventDefault();"
-                                  onclick="event.stopPropagation();"
-                                  oncommand="toggleAttachmentList(this.checked, true);"/>
-                          <hbox align="center" id="attachmentInfo" flex="1">
-                            <image id="attachmentIcon"/>
-                            <label id="attachmentCount"/>
-                            <label id="attachmentName" crop="center" flex="1"
-                                   role="button"
-                                   tooltiptext="&openAttachment.tooltip;"
-                                   tooltiptextopen="&openAttachment.tooltip;"
-                                   onclick="OpenAttachmentFromBar(event);"
-                                   ondragstart="attachmentNameDNDObserver.onDragStart(event);"/>
-                            <label id="attachmentSize"/>
-                          </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"/>
+                          <!-- the message pane consists of 4 'boxes'. Box #4 is the attachment
+                               box which can be toggled into a slim or an expanded view -->
+                          <hbox align="center" id="attachmentBar"
+                                context="attachment-toolbar-context-menu"
+                                onclick="if (event.button == 0) { toggleAttachmentList(undefined, true); }">
+                            <button type="checkbox" id="attachmentToggle"
+                                    onmousedown="event.preventDefault();"
+                                    onclick="event.stopPropagation();"
+                                    oncommand="toggleAttachmentList(this.checked, true);"/>
+                            <hbox align="center" id="attachmentInfo" flex="1">
+                              <image id="attachmentIcon"/>
+                              <label id="attachmentCount"/>
+                              <label id="attachmentName" crop="center" flex="1"
+                                     role="button"
+                                     tooltiptext="&openAttachment.tooltip;"
+                                     tooltiptextopen="&openAttachment.tooltip;"
+                                     onclick="OpenAttachmentFromBar(event);"
+                                     ondragstart="attachmentNameDNDObserver.onDragStart(event);"/>
+                              <label id="attachmentSize"/>
+                            </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;"
-                                               onclick="event.stopPropagation();"
-                                               oncommand="TryHandleAllAttachments('saveAs'); RestoreFocusAfterHdrButton();"
-                                               hidden="true">
-                                  <menupopup id="attachmentSaveAllSingleMenu"
-                                             onpopupshowing="onShowSaveAttachmentMenuSingle();">
-                                    <menuitem id="button-openAttachment"
-                                              oncommand="TryHandleAllAttachments('open'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&openAttachmentCmd.label;"
-                                              accesskey="&openAttachmentCmd.accesskey;"/>
-                                    <menuitem id="button-saveAttachment"
-                                              oncommand="TryHandleAllAttachments('saveAs'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&saveAsAttachmentCmd.label;"
-                                              accesskey="&saveAsAttachmentCmd.accesskey;"/>
-                                    <menuseparator id="button-menu-separator"/>
-                                    <menuitem id="button-detachAttachment"
-                                              oncommand="TryHandleAllAttachments('detach'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&detachAttachmentCmd.label;"
-                                              accesskey="&detachAttachmentCmd.accesskey;"/>
-                                    <menuitem id="button-deleteAttachment"
-                                              oncommand="TryHandleAllAttachments('delete'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&deleteAttachmentCmd.label;"
-                                              accesskey="&deleteAttachmentCmd.accesskey;"/>
-                                  </menupopup>
-                                </toolbarbutton>
-                                <toolbarbutton is="toolbarbutton-menu-button" id="attachmentSaveAllMultiple"
-                                               type="menu-button"
-                                               class="toolbarbutton-1 msgHeaderView-button"
-                                               label="&saveAllAttachmentsButton1.label;"
-                                               tooltiptext="&saveAllAttachmentsButton1.tooltip;"
-                                               onclick="event.stopPropagation();"
-                                               oncommand="TryHandleAllAttachments('save'); RestoreFocusAfterHdrButton();">
-                                  <menupopup id="attachmentSaveAllMultipleMenu"
-                                             onpopupshowing="onShowSaveAttachmentMenuMultiple();">
-                                    <menuitem id="button-openAllAttachments"
-                                              oncommand="TryHandleAllAttachments('open'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&openAllAttachmentsCmd.label;"
-                                              accesskey="&openAllAttachmentsCmd.accesskey;"/>
-                                    <menuitem id="button-saveAllAttachments"
-                                              oncommand="TryHandleAllAttachments('save'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&saveAllAttachmentsCmd.label;"
-                                              accesskey="&saveAllAttachmentsCmd.accesskey;"/>
-                                    <menuseparator id="button-menu-separator-all"/>
-                                    <menuitem id="button-detachAllAttachments"
-                                              oncommand="TryHandleAllAttachments('detach'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&detachAllAttachmentsCmd.label;"
-                                              accesskey="&detachAllAttachmentsCmd.accesskey;"/>
-                                    <menuitem id="button-deleteAllAttachments"
-                                              oncommand="TryHandleAllAttachments('delete'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
-                                              label="&deleteAllAttachmentsCmd.label;"
-                                              accesskey="&deleteAllAttachmentsCmd.accesskey;"/>
-                                  </menupopup>
-                                </toolbarbutton>
-                              </toolbaritem>
-                            </hbox>
-                          </vbox>
-                        </hbox>
-                        <hbox class="attachments-container">
-                          <richlistbox is="attachment-list" id="attachmentList"
-                                       class="attachmentList"
-                                       orient="horizontal"
-                                       seltype="multiple"
-                                       context="attachmentListContext"
-                                       itemcontext="attachmentItemContext"
-                                       role="listbox"
-                                       flex="1"
-                                       ondragstart="attachmentListDNDObserver.onDragStart(event);"/>
-                        </hbox>
+                            <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;"
+                                                 onclick="event.stopPropagation();"
+                                                 oncommand="TryHandleAllAttachments('saveAs'); RestoreFocusAfterHdrButton();"
+                                                 hidden="true">
+                                    <menupopup id="attachmentSaveAllSingleMenu"
+                                               onpopupshowing="onShowSaveAttachmentMenuSingle();">
+                                      <menuitem id="button-openAttachment"
+                                                oncommand="TryHandleAllAttachments('open'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&openAttachmentCmd.label;"
+                                                accesskey="&openAttachmentCmd.accesskey;"/>
+                                      <menuitem id="button-saveAttachment"
+                                                oncommand="TryHandleAllAttachments('saveAs'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&saveAsAttachmentCmd.label;"
+                                                accesskey="&saveAsAttachmentCmd.accesskey;"/>
+                                      <menuseparator id="button-menu-separator"/>
+                                      <menuitem id="button-detachAttachment"
+                                                oncommand="TryHandleAllAttachments('detach'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&detachAttachmentCmd.label;"
+                                                accesskey="&detachAttachmentCmd.accesskey;"/>
+                                      <menuitem id="button-deleteAttachment"
+                                                oncommand="TryHandleAllAttachments('delete'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&deleteAttachmentCmd.label;"
+                                                accesskey="&deleteAttachmentCmd.accesskey;"/>
+                                    </menupopup>
+                                  </toolbarbutton>
+                                  <toolbarbutton is="toolbarbutton-menu-button" id="attachmentSaveAllMultiple"
+                                                 type="menu-button"
+                                                 class="toolbarbutton-1 msgHeaderView-button"
+                                                 label="&saveAllAttachmentsButton1.label;"
+                                                 tooltiptext="&saveAllAttachmentsButton1.tooltip;"
+                                                 onclick="event.stopPropagation();"
+                                                 oncommand="TryHandleAllAttachments('save'); RestoreFocusAfterHdrButton();">
+                                    <menupopup id="attachmentSaveAllMultipleMenu"
+                                               onpopupshowing="onShowSaveAttachmentMenuMultiple();">
+                                      <menuitem id="button-openAllAttachments"
+                                                oncommand="TryHandleAllAttachments('open'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&openAllAttachmentsCmd.label;"
+                                                accesskey="&openAllAttachmentsCmd.accesskey;"/>
+                                      <menuitem id="button-saveAllAttachments"
+                                                oncommand="TryHandleAllAttachments('save'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&saveAllAttachmentsCmd.label;"
+                                                accesskey="&saveAllAttachmentsCmd.accesskey;"/>
+                                      <menuseparator id="button-menu-separator-all"/>
+                                      <menuitem id="button-detachAllAttachments"
+                                                oncommand="TryHandleAllAttachments('detach'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&detachAllAttachmentsCmd.label;"
+                                                accesskey="&detachAllAttachmentsCmd.accesskey;"/>
+                                      <menuitem id="button-deleteAllAttachments"
+                                                oncommand="TryHandleAllAttachments('delete'); event.stopPropagation(); RestoreFocusAfterHdrButton();"
+                                                label="&deleteAllAttachmentsCmd.label;"
+                                                accesskey="&deleteAllAttachmentsCmd.accesskey;"/>
+                                    </menupopup>
+                                  </toolbarbutton>
+                                </toolbaritem>
+                              </hbox>
+                            </vbox>
+                          </hbox>
+                          <hbox class="attachments-container">
+                            <richlistbox is="attachment-list" id="attachmentList"
+                                         class="attachmentList"
+                                         orient="horizontal"
+                                         seltype="multiple"
+                                         context="attachmentListContext"
+                                         itemcontext="attachmentItemContext"
+                                         role="listbox"
+                                         flex="1"
+                                         ondragstart="attachmentListDNDObserver.onDragStart(event);"/>
+                          </hbox>