Bug 1136732 - Limit Minimum Firefox Viewport height to 100px. r=bgrinstead
☠☠ backed out by 2d07ec25d027 ☠ ☠
authorAaron Raimist <aaronraimist@protonmail.ch>
Fri, 29 May 2015 14:34:00 +0200
changeset 246421 c9867a69b2018df973c6147b821219b63aa6c9b9
parent 246420 049b2fdb07115d6793c99b687796be06751cacac
child 246422 012c47aa86b54952bc2b26261e1f580603e43a25
push id28829
push usercbook@mozilla.com
push dateMon, 01 Jun 2015 12:18:22 +0000
treeherdermozilla-central@2fa4bb097f03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrinstead
bugs1136732
milestone41.0a1
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 1136732 - Limit Minimum Firefox Viewport height to 100px. r=bgrinstead
browser/base/content/browser.css
browser/devtools/framework/test/browser_toolbox_hosts_size.js
browser/devtools/framework/toolbox-hosts.js
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -43,17 +43,17 @@
 }
 
 searchbar {
   -moz-binding: url("chrome://browser/content/search/search.xml#searchbar");
 }
 
 /* Prevent shrinking the page content to 0 height and width */
 .browserStack > browser {
-  min-height: 25px;
+  min-height: 100px;
   min-width: 25px;
 }
 
 .browserStack > browser {
   -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-browser");
 }
 
 .browserStack > browser[remote="true"] {
--- a/browser/devtools/framework/test/browser_toolbox_hosts_size.js
+++ b/browser/devtools/framework/test/browser_toolbox_hosts_size.js
@@ -15,27 +15,28 @@ add_task(function*() {
   // to be clamped to fit into the browser window.
   Services.prefs.setIntPref("devtools.toolbox.footer.height", 10000);
   Services.prefs.setIntPref("devtools.toolbox.sidebar.width", 10000);
 
   let tab = yield addTab(URL);
   let nbox = gBrowser.getNotificationBox();
   let {clientHeight: nboxHeight, clientWidth: nboxWidth} = nbox;
   let toolbox = yield gDevTools.showToolbox(TargetFactory.forTab(tab));
+  let {MIN_PAGE_SIZE} = devtools.require("devtools/framework/toolbox-hosts");
 
   is (nbox.clientHeight, nboxHeight, "Opening the toolbox hasn't changed the height of the nbox");
   is (nbox.clientWidth, nboxWidth, "Opening the toolbox hasn't changed the width of the nbox");
 
   let iframe = document.getAnonymousElementByAttribute(nbox, "class", "devtools-toolbox-bottom-iframe");
-  is (iframe.clientHeight, nboxHeight - 25, "The iframe fits within the available space");
+  is (iframe.clientHeight, nboxHeight - MIN_PAGE_SIZE, "The iframe fits within the available space");
 
   yield toolbox.switchHost(devtools.Toolbox.HostType.SIDE);
   iframe = document.getAnonymousElementByAttribute(nbox, "class", "devtools-toolbox-side-iframe");
   iframe.style.minWidth = "1px"; // Disable the min width set in css
-  is (iframe.clientWidth, nboxWidth - 25, "The iframe fits within the available space");
+  is (iframe.clientWidth, nboxWidth - MIN_PAGE_SIZE, "The iframe fits within the available space");
 
   yield cleanup(toolbox);
 });
 
 add_task(function*() {
   // Set size prefs to something reasonable, so we can check to make sure
   // they are being set properly.
   Services.prefs.setIntPref("devtools.toolbox.footer.height", 100);
--- a/browser/devtools/framework/toolbox-hosts.js
+++ b/browser/devtools/framework/toolbox-hosts.js
@@ -9,17 +9,17 @@ const EventEmitter = require("devtools/t
 const {Promise: promise} = require("resource://gre/modules/Promise.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource:///modules/devtools/DOMHelpers.jsm");
 
 /* A host should always allow this much space for the page to be displayed.
  * There is also a min-height on the browser, but we still don't want to set
  * frame.height to be larger than that, since it can cause problems with
  * resizing the toolbox and panel layout. */
-const MIN_PAGE_SIZE = 25;
+const MIN_PAGE_SIZE = exports.MIN_PAGE_SIZE = 100;
 
 /**
  * A toolbox host represents an object that contains a toolbox (e.g. the
  * sidebar or a separate window). Any host object should implement the
  * following functions:
  *
  * create() - create the UI and emit a 'ready' event when the UI is ready to use
  * destroy() - destroy the host's UI