back out 0528e2561bde (bug 719318) for tickling browser_social_chatwindow.js's bustedness

This commit is contained in:
Gavin Sharp 2013-02-12 15:43:25 -08:00
parent be43770a1d
commit 99c7689205

View File

@ -1256,33 +1256,19 @@ var gBrowserInit = {
// Set a sane starting width/height for all resolutions on new profiles.
if (!document.documentElement.hasAttribute("width")) {
let defaultWidth;
let defaultWidth = 994;
let defaultHeight;
// Very small: maximize the window
// Portrait : use about full width and 3/4 height, to view entire pages
// at once (without being obnoxiously tall)
// Widescreen: use about half width, to suggest side-by-side page view
// Otherwise : use 3/4 height and width
if (screen.availHeight <= 600) {
document.documentElement.setAttribute("sizemode", "maximized");
defaultWidth = 610;
defaultHeight = 450;
}
else {
if (screen.availWidth <= screen.availHeight) {
defaultWidth = screen.availWidth * .9;
defaultHeight = screen.availHeight * .75;
}
else if (screen.availWidth >= 2048) {
// Create a narrower window for large or wide-aspect displays, to suggest
// side-by-side page view.
if (screen.availWidth >= 1600)
defaultWidth = (screen.availWidth / 2) - 20;
defaultHeight = screen.availHeight - 10;
}
else {
defaultWidth = screen.availWidth * .75;
defaultHeight = screen.availHeight * .75;
}
#ifdef MOZ_WIDGET_GTK2
// On X, we're not currently able to account for the size of the window
// border. Use 28px as a guess (titlebar + bottom window border)