icecat: add release icecat-140.7.0-1gnu1 for aramo

This commit is contained in:
Ark74 2026-01-18 00:16:18 -06:00
parent 17ba0259bf
commit 86c0c0ca33
156 changed files with 9131 additions and 4525 deletions

View file

@ -607,7 +607,7 @@ export class FormAutofillHandler {
this.#refillTimeoutId = lazy.setTimeout(() => {
for (let [e, v] of filledElementValues) {
if (e.autofillState == FIELD_STATES.AUTO_FILLED && e.value === v) {
if (e.autofillState == FIELD_STATES.NORMAL || e.value) {
// Nothing to do if the autofilled value wasn't cleared or the
// element's autofill state has changed to NORMAL in the meantime
continue;

View file

@ -22,7 +22,8 @@ namespace mozilla::glean {
namespace impl {
using CallbackMapType = nsTHashMap<uint32_t, FalliblePingTestCallback>;
using CallbackMapType =
nsTHashMap<NoMemMoveKey<nsUint32HashKey>, FalliblePingTestCallback>;
using MetricIdToCallbackMutex = StaticDataMutex<UniquePtr<CallbackMapType>>;
static Maybe<MetricIdToCallbackMutex::AutoLock> GetCallbackMapLock() {
static MetricIdToCallbackMutex sCallbacks("sCallbacks");

View file

@ -1203,6 +1203,9 @@ PdfStreamConverter.prototype = {
);
// The viewer does not need to handle HTTP Refresh header.
aRequest.setResponseHeader("Refresh", "", false);
// There is no reason to load something via <link>: the only external
// resource is the pdf itself.
aRequest.setResponseHeader("Link", "", false);
}
lazy.PdfJsTelemetryContent.onViewerIsUsed();

View file

@ -83,6 +83,9 @@ support-files = [
["browser_pdfjs_properties.js"]
["browser_pdfjs_response_link.js"]
support-files = ["pdf_response_link.sjs"]
["browser_pdfjs_saveas.js"]
support-files = [
"!/toolkit/content/tests/browser/common/mockTransfer.js",

View file

@ -0,0 +1,46 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const RELATIVE_DIR = "toolkit/components/pdfjs/test/";
const TESTROOT = "https://example.com/browser/" + RELATIVE_DIR;
function getBodyBackgroundColor(browser) {
return SpecialPowers.spawn(browser, [], async () => {
return content.getComputedStyle(content.document.querySelector("body"))
.backgroundColor;
});
}
// Sanity check: the pdf test does not trivially pass due to the lack of support
// for Link header.
add_task(async function test_plain_text_with_link_in_response() {
await BrowserTestUtils.withNewTab(
{ gBrowser, url: `${TESTROOT}pdf_response_link.sjs?text` },
async function (browser) {
const bodyBackgroundColor = await getBodyBackgroundColor(browser);
Assert.equal(
bodyBackgroundColor,
"rgb(255, 0, 0)",
"Body background is red"
);
}
);
});
add_task(async function test_pdf_with_link_in_response() {
makePDFJSHandler();
await BrowserTestUtils.withNewTab(
{ gBrowser, url: "about:blank" },
async function (browser) {
await waitForPdfJSCanvas(browser, `${TESTROOT}pdf_response_link.sjs?pdf`);
const bodyBackgroundColor = await getBodyBackgroundColor(browser);
Assert.notEqual(
bodyBackgroundColor,
"rgb(255, 0, 0)",
"Body background is not red"
);
await waitForPdfJSClose(browser);
}
);
});

View file

@ -0,0 +1,24 @@
const DATA = {
pdf: {
mimetype: "application/pdf",
content:
"%PDF-1.\ntrailer<</Root<</Pages<</Kids[<</MediaBox[0 0 3 3]>>]>>>>>>",
},
text: {
mimetype: "text/plain",
content: "hello world",
},
};
function handleRequest(request, response) {
response.setHeader("Cache-Control", "no-cache", false);
response.setHeader(
"Link",
"<data:text/css,body{background:red%20!important;}>; rel=stylesheet",
false
);
response.setStatusLine(request.httpVersion, "200", "Found");
const { mimetype, content } = DATA[request.queryString];
response.setHeader("Content-Type", mimetype, false);
response.write(content);
}

View file

@ -127,7 +127,8 @@ nsresult ViaductRequest::LaunchRequest(
nullptr, loadFlags);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel);
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCString method = ConvertMethod(request.method());
rv = httpChannel->SetRequestMethod(method);
NS_ENSURE_SUCCESS(rv, rv);