Bug 1515174 - Remove unnecessary box wrapping pref pane contents. r=jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Wed, 19 Dec 2018 10:39:48 +1300
changeset 33172 e2b8bf66d263
parent 33171 0de1fa19a420
child 33173 2d9043361668
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1515174
Bug 1515174 - Remove unnecessary box wrapping pref pane contents. r=jorgk
common/bindings/preferences.xml
mail/components/preferences/applications.inc.xul
--- a/common/bindings/preferences.xml
+++ b/common/bindings/preferences.xml
@@ -870,21 +870,16 @@
                     // This needs to include its padding to resize properly.
                     // See bug 394433
                     var bottomPadding = 0;
                     var bottomBox = aPaneElement.getElementsByAttribute("class", "bottomBox")[0];
                     if (bottomBox)
                       bottomPadding = parseInt(window.getComputedStyle(bottomBox).paddingBottom);
                     window.innerHeight += bottomPadding + verticalPadding + aPaneElement.contentHeight - targetHeight;
                   }
-
-                  // XXX rstrong - extend the contents of the prefpane to
-                  // prevent elements from being cutoff (see bug 349098).
-                  if (aPaneElement.contentHeight + verticalPadding < targetHeight)
-                    aPaneElement._content.style.height = targetHeight - verticalPadding + "px";
                 }
               }
               break;
             }
           }
         ]]>
         </body>
       </method>
@@ -1155,21 +1150,16 @@
         event.stopPropagation();
         event.preventDefault();
       ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="prefpane">
-    <content>
-      <xul:vbox class="content-box" xbl:inherits="flex">
-        <children/>
-      </xul:vbox>
-    </content>
     <implementation>
       <method name="writePreferences">
         <parameter name="aFlushToDisk"/>
         <body>
         <![CDATA[
           // Write all values to preferences.
           if (this._deferredValueUpdateElements.size) {
             this._finalizeDeferredElements();
@@ -1313,25 +1303,22 @@
             }
           }
         ]]>
         </body>
       </method>
 
       <property name="contentHeight">
         <getter>
-          var targetHeight = parseInt(window.getComputedStyle(this._content).height);
-          targetHeight += parseInt(window.getComputedStyle(this._content).marginTop);
-          targetHeight += parseInt(window.getComputedStyle(this._content).marginBottom);
+          var targetHeight = parseInt(window.getComputedStyle(this).height);
+          targetHeight += parseInt(window.getComputedStyle(this).marginTop);
+          targetHeight += parseInt(window.getComputedStyle(this).marginBottom);
           return targetHeight;
         </getter>
       </property>
-      <field name="_content">
-        document.getAnonymousElementByAttribute(this, "class", "content-box");
-      </field>
     </implementation>
     <handlers>
       <handler event="command">
         // This "command" event handler tracks changes made to preferences by
         // the user in this window.
         if (event.sourceEvent)
           event = event.sourceEvent;
         this.userChangedValue(event.target);
--- a/mail/components/preferences/applications.inc.xul
+++ b/mail/components/preferences/applications.inc.xul
@@ -1,15 +1,14 @@
 # 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/.
   <prefpane id="paneApplications"
             label="&paneAttachments.title;"
-            onpaneload="gApplicationsTabController.init();"
-            flex="1">
+            onpaneload="gApplicationsTabController.init();">
 
     <script type="application/javascript">
     <![CDATA[
 #ifdef MOZ_WIDGET_GTK
       var ICON_URL_APP      = "moz-icon://dummy.exe?size=16";
 #else
       var ICON_URL_APP      = "chrome://messenger/skin/preferences/application.png";
 #endif