зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1136732 - Limit Minimum Firefox Viewport height to 100px. r=bgrinstead
This commit is contained in:
Родитель
a723ed3ad7
Коммит
3e6f7719e7
|
@ -48,7 +48,7 @@ searchbar {
|
|||
|
||||
/* Prevent shrinking the page content to 0 height and width */
|
||||
.browserStack > browser {
|
||||
min-height: 25px;
|
||||
min-height: 100px;
|
||||
min-width: 25px;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,17 +20,18 @@ add_task(function*() {
|
|||
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);
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ Cu.import("resource:///modules/devtools/DOMHelpers.jsm");
|
|||
* 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
|
||||
|
|
Загрузка…
Ссылка в новой задаче