Bug 868495 Workaround for unusually large DirectWrite font line heights r=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Thu, 20 Jun 2013 21:38:33 +0100
changeset 15771 2eb297b4b15e50c40a1585fca26187059a5ea980
parent 15770 9b76619bdfe4706731fd5bb716fd724ae5e8e93b
child 15772 0c3b85a1c1f7a17fdfe4a3e8dd8f2ae780dc538c
push id942
push userbugzilla@standard8.plus.com
push dateMon, 05 Aug 2013 19:15:38 +0000
treeherdercomm-beta@0e1a1c4a9f0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs868495
Bug 868495 Workaround for unusually large DirectWrite font line heights r=IanN
suite/common/bindings/prefwindow.xml
suite/common/communicator.css
--- a/suite/common/bindings/prefwindow.xml
+++ b/suite/common/bindings/prefwindow.xml
@@ -267,46 +267,36 @@
           // panel select events) "fire" before we get here. Thus, we may need
           // to sync the tree manually now (again), if we added any panels or
           // if toolkit failed to select one.
           // (This is a loose copy from the toolkit ctor.)
           var lastPane = this.lastSelected &&
                          document.getElementById(this.lastSelected);
           if (!lastPane)
             this.lastSelected = "";
-          var paneToLoad = null;
           if ("arguments" in window && window.arguments[0])
           {
             var initialPane = document.getElementById(window.arguments[0]);
             if (initialPane && initialPane.nodeName == "prefpane")
             {
-              paneToLoad = initialPane;
-              this.lastSelected = paneToLoad.id;
+              this.currentPane = initialPane;
+              this.lastSelected = initialPane.id;
             }
           }
           else if (lastPane)
-            paneToLoad = lastPane;
-          else if (this.preferencePanes.length > 0)
-            paneToLoad = this.preferencePanes[0];
-          if (paneToLoad && (paneToLoad != this.currentPane))
+            this.currentPane = lastPane;
+          try
           {
-            this._initialized = false;
-            try
-            {
-              this.showPane(paneToLoad); // may need to load it first
-            }
-            catch (e)
-            {
-              dump('***** broken prefpane: ' + paneToLoad.id + '\n' + e + '\n');
-              paneToLoad = null;
-            }
-            this.currentPane = paneToLoad;
+            this.showPane(this.currentPane); // may need to load it first
+            this.syncTreeWithPane(this.currentPane, true);
           }
-          if (this.currentPane)
-            this.syncTreeWithPane(this.currentPane, true);
+          catch (e)
+          {
+            dump('***** broken prefpane: ' + this.currentPane.id + '\n' + e + '\n');
+          }
         ]]>
         </body>
       </method>
 
       <!-- don't do any fancy animations -->
       <property name="_shouldAnimate" onget="return false;"/>
 
       <method name="setPaneTitle">
@@ -382,16 +372,18 @@
 
               // mark selected pane in navigation tree
               var index = this._navigationTree.contentView
                               .getIndexOfItem(aPane.preftreeitem);
               this._navigationTree.view.selection.select(index);
             }
           }
           this.setPaneTitle(aPane);
+          if (this.scrollHeight > window.innerHeight)
+            window.innerHeight = this.scrollHeight;
         ]]>
         </body>
       </method>
 
     <!-- copied from contextHelp.js
          Locate existing help window for this helpFileURI. -->
       <method name="locateHelpWindow">
         <parameter name="helpFileURI"/>
--- a/suite/common/communicator.css
+++ b/suite/common/communicator.css
@@ -71,16 +71,21 @@ prefwindow[xpfe="false"] {
 prefpane[xpfe="false"] {
   -moz-binding: url("chrome://global/content/bindings/preferences.xml#prefpane");
 }
 
 findbar[xpfe="false"] {
   -moz-binding: url("chrome://global/content/bindings/findbar.xml#findbar");
 }
 
+prefwindow[xpfe="false"] > .paneDeckContainer,
+prefpane[xpfe="false"] > .content-box {
+  overflow: hidden;
+}
+
 /******* SeaMonkey XPFE *******/
 /* These bindings reflect SeaMonkey XPFE, modulo new toolkit features. */
 toolbox { 
   -moz-binding: url("chrome://communicator/content/bindings/toolbar.xml#grippytoolbox");
 }
   
 toolbar {
   -moz-binding: url("chrome://communicator/content/bindings/toolbar.xml#grippytoolbar");
@@ -105,16 +110,21 @@ prefwindow {
 prefpane {
   -moz-binding: url("chrome://communicator/content/bindings/prefwindow.xml#prefpane");
 }
 
 findbar {
   -moz-binding: url("chrome://communicator/content/bindings/findbar.xml#findbar");
 }
 
+prefwindow > .paneDeckContainer,
+prefpane > .content-box {
+  overflow: visible;
+}
+
 .statusbarpanel-backgroundbox {
   -moz-binding: url("chrome://communicator/content/bindings/general.xml#statusbarpanel-backgroundbox");
 }
 
 textbox[enablehistory="true"] > .autocomplete-history-dropmarker {
   display: -moz-box;
 }