Bug 573845 - open the console to a percentage of the browser window height, p=ddahl, r=dietrich
authorDavid Dahl <ddahl@mozilla.com>
Wed, 23 Jun 2010 12:30:51 -0300
changeset 44187 99d7167794ff2f007f2cf6730a422c7e28cf88bf
parent 44183 de4b3d642996f666f0b2131a4468c8a215c236bb
child 44188 e3787b57b3ab5f405e8fadd7c86f64de719bf0d1
push id14018
push userrcampbell@mozilla.com
push dateWed, 23 Jun 2010 15:32:05 +0000
treeherdermozilla-central@99d7167794ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs573845
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 573845 - open the console to a percentage of the browser window height, p=ddahl, r=dietrich
toolkit/components/console/content/headsUpDisplay.css
toolkit/components/console/hudservice/HUDService.jsm
--- a/toolkit/components/console/content/headsUpDisplay.css
+++ b/toolkit/components/console/content/headsUpDisplay.css
@@ -44,18 +44,16 @@
     height: 100%;
 }
 
 .hud-filter-btn > .toolbarbutton-icon { display: none; }
 
 .hud-console-wrapper {
     width: 100%; 
     overflow: auto; 
-    max-height: 400px; 
-    height: 400px; 
 }
 
 .hud-main-label {
     font-size: 1em;
     padding-top: 0.33em;
     font-weight: bold;
 }
 
@@ -95,18 +93,16 @@
     width: 100%;
     margin-top: 0.3em; 
     margin-bottom: 0.3em; 
     padding-left: 0.3em;
     border-bottom: 1px solid #eee;   
 }
 
 .hud-output-node {
-    height:380px; 
-    max-height: 380px;
     border-bottom: 1px solid #ddd; 
     border-top: 1px solid #ddd; 
     overflow-x: auto; overflow: auto;
     font: 1em monospace; background-color: white;
     width: 100%;
 }
 
 /* JSTerm Styles */
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -1861,16 +1861,20 @@ HeadsUpDisplay.prototype = {
    */
   makeHUDNodes: function HUD_makeHUDNodes()
   {
     let self = this;
     this.HUDBox = this.makeXULNode("vbox");
     this.HUDBox.setAttribute("id", this.hudId);
     this.HUDBox.setAttribute("class", "hud-box");
 
+    var height = Math.ceil((this.contentWindow.innerHeight * .33)) + "px";
+    var style = "height: " + height + ";";
+    this.HUDBox.setAttribute("style", style);
+
     let outerWrap = this.makeXULNode("vbox");
     outerWrap.setAttribute("class", "hud-outer-wrapper");
     outerWrap.setAttribute("flex", "1");
 
     let consoleCommandSet = this.makeXULNode("commandset");
     outerWrap.appendChild(consoleCommandSet);
 
     let consoleWrap = this.makeXULNode("vbox");
@@ -2412,17 +2416,17 @@ JSTerm.prototype = {
       var inputVal = this.history[idx - 1];
 
       if (inputVal){
         this.inputNode.value = this.history[idx - 1];
       }
     }
     else {
       var idx = this.historyPlaceHolder++;
-      if (idx > (len + 1)) {
+      if (idx > (this.history.length + 1)) {
         return;
       }
       var inputVal = this.history[idx + 1];
 
       if (inputVal){
         this.inputNode.value = this.history[idx + 1];
       }
     }