зеркало из https://github.com/mozilla/gecko-dev.git
Backout changesets 8e9aea2febed, 604544452285 and 9f150c4e1a48 because of Mac OS X 32-bit reftest orange
--HG-- extra : rebase_source : dbc017628f469e980efc8edfa26f8cce0ac7a956
This commit is contained in:
Родитель
20893d9404
Коммит
5b93c455d2
|
@ -2481,19 +2481,7 @@ SessionStoreService.prototype = {
|
|||
if (ix != -1 && total[ix] && total[ix].sizemode == "minimized")
|
||||
ix = -1;
|
||||
|
||||
let session = {
|
||||
state: this._loadState == STATE_RUNNING ? STATE_RUNNING_STR : STATE_STOPPED_STR,
|
||||
lastUpdate: Date.now(),
|
||||
startTime: this._sessionStartTime,
|
||||
recentCrashes: this._recentCrashes
|
||||
};
|
||||
|
||||
return {
|
||||
windows: total,
|
||||
selectedWindow: ix + 1,
|
||||
_closedWindows: lastClosedWindowsCopy,
|
||||
session: session
|
||||
};
|
||||
return { windows: total, selectedWindow: ix + 1, _closedWindows: lastClosedWindowsCopy };
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -3538,6 +3526,14 @@ SessionStoreService.prototype = {
|
|||
}
|
||||
}
|
||||
|
||||
oState.session = {
|
||||
state: this._loadState == STATE_RUNNING ? STATE_RUNNING_STR : STATE_STOPPED_STR,
|
||||
lastUpdate: Date.now(),
|
||||
startTime: this._sessionStartTime
|
||||
};
|
||||
if (this._recentCrashes)
|
||||
oState.session.recentCrashes = this._recentCrashes;
|
||||
|
||||
// Persist the last session if we deferred restoring it
|
||||
if (this._lastSessionState)
|
||||
oState.lastSessionState = this._lastSessionState;
|
||||
|
|
|
@ -152,7 +152,6 @@ _BROWSER_TEST_FILES = \
|
|||
browser_645428.js \
|
||||
browser_659591.js \
|
||||
browser_662812.js \
|
||||
browser_665702-state_session.js \
|
||||
$(NULL)
|
||||
|
||||
ifneq ($(OS_ARCH),Darwin)
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function compareArray(a, b) {
|
||||
if (a.length !== b.length) {
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < a.length; i++) {
|
||||
if (a[i] !== b[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function test() {
|
||||
let currentState = JSON.parse(ss.getBrowserState());
|
||||
ok(currentState.session, "session data returned by getBrowserState");
|
||||
|
||||
let keys = Object.keys(currentState.session);
|
||||
let expectedKeys = ["state", "lastUpdate", "startTime", "recentCrashes"];
|
||||
ok(compareArray(keys.sort(), expectedKeys.sort()),
|
||||
"session object from getBrowserState has correct keys");
|
||||
}
|
|
@ -413,7 +413,7 @@ nsresult nsAudioStreamLocal::Init(PRInt32 aNumChannels, PRInt32 aRate, SampleFor
|
|||
mFormat = aFormat;
|
||||
|
||||
if (sa_stream_create_pcm(reinterpret_cast<sa_stream_t**>(&mAudioHandle),
|
||||
"Mozilla",
|
||||
NULL,
|
||||
SA_MODE_WRONLY,
|
||||
SA_PCM_FORMAT_S16_NE,
|
||||
aRate,
|
||||
|
|
|
@ -3299,8 +3299,17 @@ NS_IMETHODIMP DocumentViewerImpl::SizeToContent()
|
|||
docShellAsItem->GetTreeOwner(getter_AddRefs(treeOwner));
|
||||
NS_ENSURE_TRUE(treeOwner, NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(treeOwner->SizeShellTo(docShellAsItem, width, height),
|
||||
NS_ERROR_FAILURE);
|
||||
/* presContext's size was calculated in app units and has already been
|
||||
rounded to the equivalent pixels (so the width/height calculation
|
||||
we just performed was probably exact, though it was based on
|
||||
values already rounded during ResizeReflow). In a surprising
|
||||
number of instances, this rounding makes a window which for want
|
||||
of one extra pixel's width ends up wrapping the longest line of
|
||||
text during actual window layout. This makes the window too short,
|
||||
generally clipping the OK/Cancel buttons. Here we add one pixel
|
||||
to the calculated width, to circumvent this problem. */
|
||||
NS_ENSURE_SUCCESS(treeOwner->SizeShellTo(docShellAsItem, width+1, height),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -124,6 +124,11 @@ function onAlertLoad()
|
|||
|
||||
sizeToContent();
|
||||
|
||||
// Work around a bug where sizeToContent() leaves a border outside of the content
|
||||
var contentDim = document.getElementById("alertBox").boxObject;
|
||||
if (window.innerWidth == contentDim.width + 1)
|
||||
--window.innerWidth;
|
||||
|
||||
// Start with a 1px width/height, because 0 causes trouble with gtk1/2
|
||||
gCurrentSize = 1;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче