mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
fa72b197d9
9 changed files with 52 additions and 68 deletions
|
|
@ -162,7 +162,6 @@ public:
|
||||||
|
|
||||||
inline DOMHighResTimeStamp TimeStampToDOMHighRes(mozilla::TimeStamp aStamp) const
|
inline DOMHighResTimeStamp TimeStampToDOMHighRes(mozilla::TimeStamp aStamp) const
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(!aStamp.IsNull(), "The timestamp should not be null");
|
|
||||||
if (aStamp.IsNull()) {
|
if (aStamp.IsNull()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6932,11 +6932,12 @@ nsGlobalWindow::SetFullscreenInternal(FullscreenReason aReason,
|
||||||
// gone full screen, the state trap above works.
|
// gone full screen, the state trap above works.
|
||||||
mFullScreen = aFullScreen;
|
mFullScreen = aFullScreen;
|
||||||
|
|
||||||
// Sometimes we don't want the top-level widget to actually go fullscreen,
|
// Sometimes, users don't want the DOM to actually go fullscreen, for
|
||||||
// for example in the B2G desktop client, we don't want the emulated screen
|
// example on large monitors where it would waste screen real estate.
|
||||||
// dimensions to appear to increase when entering fullscreen mode; we just
|
// When restricted by the relevant preference, we just want the content
|
||||||
// want the content to fill the entire client area of the emulator window.
|
// to fill the area of the existing window, instead, which is done by
|
||||||
if (!Preferences::GetBool("full-screen-api.ignore-widgets", false)) {
|
// skipping resizing of the top-level content widget to be screen-filling.
|
||||||
|
if (!Preferences::GetBool("full-screen-api.restrict-to-window", false)) {
|
||||||
if (MakeWidgetFullscreen(this, aReason, aFullScreen)) {
|
if (MakeWidgetFullscreen(this, aReason, aFullScreen)) {
|
||||||
// The rest of code for switching fullscreen is in nsGlobalWindow::
|
// The rest of code for switching fullscreen is in nsGlobalWindow::
|
||||||
// FinishFullscreenChange() which will be called after sizemodechange
|
// FinishFullscreenChange() which will be called after sizemodechange
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
include(../js-cxxflags.mozbuild)
|
include('../js-cxxflags.mozbuild')
|
||||||
|
|
||||||
GeckoProgram('jsapi-tests', linkage=None)
|
GeckoProgram('jsapi-tests', linkage=None)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2424,11 +2424,7 @@ namespace detail {
|
||||||
JS_PUBLIC_API(void)
|
JS_PUBLIC_API(void)
|
||||||
CheckIsValidConstructible(const Value& calleev)
|
CheckIsValidConstructible(const Value& calleev)
|
||||||
{
|
{
|
||||||
JSObject* callee = &calleev.toObject();
|
MOZ_ASSERT(calleev.toObject().isConstructor());
|
||||||
if (callee->is<JSFunction>())
|
|
||||||
MOZ_ASSERT(callee->as<JSFunction>().isConstructor());
|
|
||||||
else
|
|
||||||
MOZ_ASSERT(callee->constructHook() != nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
|
||||||
|
|
@ -1604,7 +1604,7 @@ pref("network.http.spdy.coalesce-hostnames", true);
|
||||||
pref("network.http.spdy.persistent-settings", false);
|
pref("network.http.spdy.persistent-settings", false);
|
||||||
pref("network.http.spdy.ping-threshold", 58);
|
pref("network.http.spdy.ping-threshold", 58);
|
||||||
pref("network.http.spdy.ping-timeout", 8);
|
pref("network.http.spdy.ping-timeout", 8);
|
||||||
pref("network.http.spdy.send-buffer-size", 131072);
|
pref("network.http.spdy.send-buffer-size", 0); // 0 - Auto (managed by OS)
|
||||||
pref("network.http.spdy.allow-push", true);
|
pref("network.http.spdy.allow-push", true);
|
||||||
pref("network.http.spdy.push-allowance", 131072); // 128KB
|
pref("network.http.spdy.push-allowance", 131072); // 128KB
|
||||||
pref("network.http.spdy.pull-allowance", 12582912); // 12MB
|
pref("network.http.spdy.pull-allowance", 12582912); // 12MB
|
||||||
|
|
@ -2759,8 +2759,11 @@ pref("editor.resizing.preserve_ratio", true);
|
||||||
pref("editor.positioning.offset", 0);
|
pref("editor.positioning.offset", 0);
|
||||||
|
|
||||||
pref("dom.use_watchdog", true);
|
pref("dom.use_watchdog", true);
|
||||||
pref("dom.max_chrome_script_run_time", 90);
|
pref("dom.max_chrome_script_run_time", 30);
|
||||||
pref("dom.max_script_run_time", 20);
|
pref("dom.max_script_run_time", 15);
|
||||||
|
|
||||||
|
// Automatically terminate non-responsive scripts if script_run_time expires.
|
||||||
|
pref("dom.always_stop_slow_scripts", false);
|
||||||
|
|
||||||
// Stop all scripts in a compartment when the "stop script" dialog is used.
|
// Stop all scripts in a compartment when the "stop script" dialog is used.
|
||||||
pref("dom.global_stop_script", true);
|
pref("dom.global_stop_script", true);
|
||||||
|
|
@ -4571,8 +4574,9 @@ pref("full-screen-api.enabled", false);
|
||||||
pref("full-screen-api.unprefix.enabled", true);
|
pref("full-screen-api.unprefix.enabled", true);
|
||||||
pref("full-screen-api.allow-trusted-requests-only", true);
|
pref("full-screen-api.allow-trusted-requests-only", true);
|
||||||
pref("full-screen-api.pointer-lock.enabled", true);
|
pref("full-screen-api.pointer-lock.enabled", true);
|
||||||
// whether to prevent the top level widget from going fullscreen
|
// Whether to restrict the full-screen API to the existing window size
|
||||||
pref("full-screen-api.ignore-widgets", false);
|
// If true, this effectively make fullscreen "fill window" instead.
|
||||||
|
pref("full-screen-api.restrict-to-window", false);
|
||||||
|
|
||||||
// transition duration of fade-to-black and fade-from-black, unit: ms
|
// transition duration of fade-to-black and fade-from-black, unit: ms
|
||||||
pref("full-screen-api.transition-duration.enter", "0 0");
|
pref("full-screen-api.transition-duration.enter", "0 0");
|
||||||
|
|
|
||||||
|
|
@ -788,8 +788,9 @@ Http2Stream::UpdateTransportSendEvents(uint32_t count)
|
||||||
// the session and cap the send buffers by default at 128KB.
|
// the session and cap the send buffers by default at 128KB.
|
||||||
// (10Mbit/sec @ 100ms)
|
// (10Mbit/sec @ 100ms)
|
||||||
//
|
//
|
||||||
|
// This feature is disabled by default.
|
||||||
uint32_t bufferSize = gHttpHandler->SpdySendBufferSize();
|
uint32_t bufferSize = gHttpHandler->SpdySendBufferSize();
|
||||||
if ((mTotalSent > bufferSize) && !mSetTCPSocketBuffer) {
|
if ((bufferSize > 0) && (mTotalSent > bufferSize) && !mSetTCPSocketBuffer) {
|
||||||
mSetTCPSocketBuffer = 1;
|
mSetTCPSocketBuffer = 1;
|
||||||
mSocketTransport->SetSendBufferSize(bufferSize);
|
mSocketTransport->SetSendBufferSize(bufferSize);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1362,10 +1362,10 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PREF_CHANGED(HTTP_PREF("spdy.chunk-size"))) {
|
if (PREF_CHANGED(HTTP_PREF("spdy.chunk-size"))) {
|
||||||
// keep this within http/2 ranges of 1 to 2^14-1
|
// keep this within http/2 ranges of 1 to 2^24-1
|
||||||
rv = prefs->GetIntPref(HTTP_PREF("spdy.chunk-size"), &val);
|
rv = prefs->GetIntPref(HTTP_PREF("spdy.chunk-size"), &val);
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
mSpdySendingChunkSize = (uint32_t) clamped(val, 1, 0x3fff);
|
mSpdySendingChunkSize = (uint32_t) clamped(val, 1, 0xffffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The amount of idle seconds on a spdy connection before initiating a
|
// The amount of idle seconds on a spdy connection before initiating a
|
||||||
|
|
@ -1437,8 +1437,12 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
||||||
// closing the session.
|
// closing the session.
|
||||||
if (PREF_CHANGED(HTTP_PREF("spdy.send-buffer-size"))) {
|
if (PREF_CHANGED(HTTP_PREF("spdy.send-buffer-size"))) {
|
||||||
rv = prefs->GetIntPref(HTTP_PREF("spdy.send-buffer-size"), &val);
|
rv = prefs->GetIntPref(HTTP_PREF("spdy.send-buffer-size"), &val);
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
if (val != 0)
|
||||||
mSpdySendBufferSize = (uint32_t) clamped(val, 1500, 0x7fffffff);
|
mSpdySendBufferSize = (uint32_t) clamped(val, 1500, 0x7fffffff);
|
||||||
|
else
|
||||||
|
mSpdySendBufferSize = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The maximum amount of time to wait for socket transport to be
|
// The maximum amount of time to wait for socket transport to be
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
||||||
DIRS += ['filepicker']
|
DIRS += ['filepicker']
|
||||||
|
|
||||||
if CONFIG['MOZ_TOOLKIT_SEARCH'] and not CONFIG['MC_BASILISK'] \
|
if CONFIG['MOZ_TOOLKIT_SEARCH'] and not CONFIG['MC_BASILISK'] \
|
||||||
|
and not CONFIG['HYPE_ICEDOVE'] \
|
||||||
and not CONFIG['HYPE_ICEWEASEL']:
|
and not CONFIG['HYPE_ICEWEASEL']:
|
||||||
DIRS += ['search']
|
DIRS += ['search']
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1699,47 +1699,6 @@ nsLocalFile::Contains(nsIFile* aInFile, bool* aResult)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsresult ReadLinkSafe(const nsCString& aTarget, int32_t aExpectedSize,
|
|
||||||
nsACString& aOutBuffer) {
|
|
||||||
// If we call readlink with a buffer size S it returns S, then we cannot tell
|
|
||||||
// if the buffer was big enough to hold the entire path. We allocate an
|
|
||||||
// additional byte so we can check if the buffer was large enough.
|
|
||||||
const auto allocSize = CheckedInt<size_t>(aExpectedSize) + 1;
|
|
||||||
if (!allocSize.isValid()) {
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto result = aOutBuffer.BulkWrite(allocSize.value(), 0, false);
|
|
||||||
if (result.isErr()) {
|
|
||||||
return result.unwrapErr();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto handle = result.unwrap();
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
ssize_t bytesWritten =
|
|
||||||
readlink(aTarget.get(), handle.Elements(), handle.Length());
|
|
||||||
if (bytesWritten < 0) {
|
|
||||||
return NSRESULT_FOR_ERRNO();
|
|
||||||
}
|
|
||||||
|
|
||||||
// written >= 0 so it is safe to cast to size_t.
|
|
||||||
if ((size_t)bytesWritten < handle.Length()) {
|
|
||||||
// Target might have changed since the lstat call, or lstat might lie, see
|
|
||||||
// bug 1791029.
|
|
||||||
handle.Finish(bytesWritten, false);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The buffer was not large enough, so double it and try again.
|
|
||||||
auto restartResult = handle.RestartBulkWrite(handle.Length() * 2, 0, false);
|
|
||||||
if (restartResult.isErr()) {
|
|
||||||
return restartResult.unwrapErr();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsLocalFile::GetNativeTarget(nsACString& aResult)
|
nsLocalFile::GetNativeTarget(nsACString& aResult)
|
||||||
{
|
{
|
||||||
|
|
@ -1755,12 +1714,21 @@ nsLocalFile::GetNativeTarget(nsACString& aResult)
|
||||||
return NS_ERROR_FILE_INVALID_PATH;
|
return NS_ERROR_FILE_INVALID_PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t size = (int32_t)symStat.st_size;
|
||||||
nsAutoCString target;
|
nsAutoCString target;
|
||||||
nsresult rv = ReadLinkSafe(mPath, symStat.st_size, target);
|
if (!target.SetLength(size, mozilla::fallible)) {
|
||||||
if (NS_FAILED(rv)) {
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ssize_t written = readlink(mPath.get(), target.BeginWriting(), size_t(size));
|
||||||
|
if (written < 0) {
|
||||||
|
return NSRESULT_FOR_ERRNO();
|
||||||
|
}
|
||||||
|
// Target might have changed since the lstat call, or lstat might lie, see bug
|
||||||
|
// 1791029.
|
||||||
|
target.Truncate(written);
|
||||||
|
|
||||||
|
nsresult rv = NS_OK;
|
||||||
nsCOMPtr<nsIFile> self(this);
|
nsCOMPtr<nsIFile> self(this);
|
||||||
int32_t maxLinks = 40;
|
int32_t maxLinks = 40;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
@ -1798,12 +1766,22 @@ nsLocalFile::GetNativeTarget(nsACString& aResult)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t newSize = (int32_t)symStat.st_size;
|
||||||
|
size = newSize;
|
||||||
nsAutoCString newTarget;
|
nsAutoCString newTarget;
|
||||||
rv = ReadLinkSafe(flatRetval, symStat.st_size, newTarget);
|
if (!newTarget.SetLength(size, mozilla::fallible)) {
|
||||||
if (NS_FAILED(rv)) {
|
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ssize_t linkLen = readlink(flatRetval.get(), newTarget.BeginWriting(), size);
|
||||||
|
if (linkLen == -1) {
|
||||||
|
rv = NSRESULT_FOR_ERRNO();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Target might have changed since the lstat call, or lstat might lie, see bug
|
||||||
|
// 1791029.
|
||||||
|
newTarget.Truncate(linkLen);
|
||||||
target = newTarget;
|
target = newTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue