Bug 966655 - Add 2px extra height for msgHeadersToolbar to ensure scrollbar-less visibility of recipients per addresswidget.numRowsShownDefault pref. r=Paenglab,a=Standard8
authorThomas Düllmann <bugzilla2007@duellmann24.net>
Thu, 28 Aug 2014 08:54:42 +0100
changeset 20305 23db718a60f1e92f501318538c331c71009959b9
parent 20304 15a9f27b215793481c23e787b6e3a76394bf9865
child 20306 9ddc53f410750de6b23eb84859ce7dedccfd4a20
push id1205
push usermbanner@mozilla.com
push dateThu, 28 Aug 2014 10:16:02 +0000
treeherdercomm-beta@9ddc53f41075 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPaenglab, Standard8
bugs966655
Bug 966655 - Add 2px extra height for msgHeadersToolbar to ensure scrollbar-less visibility of recipients per addresswidget.numRowsShownDefault pref. r=Paenglab,a=Standard8
mail/components/compose/content/addressingWidgetOverlay.js
--- a/mail/components/compose/content/addressingWidgetOverlay.js
+++ b/mail/components/compose/content/addressingWidgetOverlay.js
@@ -49,27 +49,33 @@ function awGetNumberOfCols()
  */
 function awInitializeNumberOfRowsShown()
 {
   let msgHeadersToolbar = document.getElementById("MsgHeadersToolbar");
   let addressingWidget = document.getElementById("addressingWidget");
   let awNumRowsShownDefault =
     Services.prefs.getIntPref("mail.compose.addresswidget.numRowsShownDefault");
 
+  // Work around bug 966655: extraHeight 2 pixels for msgHeadersToolbar ensures
+  // visibility of recipient rows per awNumRowsShownDefault and prevents scrollbar
+  // on empty Address Widget, depending on OS screen resolution dpi scaling
+  // (> 100%; thresholds differ).
+  let extraHeight = 2;
+
   // Set minimum number of rows shown for address widget, per hardwired
   // rows="1" attribute of addressingWidget, to prevent resizing the
   // subject and format toolbar over the address widget.
   // This lets users shrink the address widget to one row (with delicate UX)
   // and thus maximize the space available for composition body,
   // especially on small screens.
   msgHeadersToolbar.minHeight = msgHeadersToolbar.boxObject.height;
 
   // Set default number of rows shown for address widget.
   addressingWidget.setAttribute("rows", awNumRowsShownDefault);
-  msgHeadersToolbar.height = msgHeadersToolbar.boxObject.height;
+  msgHeadersToolbar.height = msgHeadersToolbar.boxObject.height + extraHeight;
 
   // Update addressingWidget internals.
   awCreateOrRemoveDummyRows();
 }
 
 function awInputElementName()
 {
   if (inputElementType == "")