Skip to content

Commit

Permalink
Merge pull request #1521 from Floorp-Projects/upstream-esr128-2024112…
Browse files Browse the repository at this point in the history
…3023341

Pull upstream
  • Loading branch information
surapunoyousei authored Nov 24, 2024
2 parents 38ae421 + d25f47c commit 888aead
Show file tree
Hide file tree
Showing 117 changed files with 15,003 additions and 3,943 deletions.
2 changes: 2 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -5086,3 +5086,5 @@ e2cb3d9c8cfc18acad7f77add351416dc95b67c4 FIREFOX_128_3_0esr_RELEASE
e0c969a3bfc0a23219384269e5b36a589c8f6cc5 FIREFOX_128_3_1esr_BUILD1
e0c969a3bfc0a23219384269e5b36a589c8f6cc5 FIREFOX_128_3_1esr_RELEASE
c4a5d008ee64fab523384408fa2868e2d028025d FIREFOX_128_4_0esr_BUILD1
c4a5d008ee64fab523384408fa2868e2d028025d FIREFOX_128_4_0esr_RELEASE
68352da82b95d7114af99b268c179195fd2fead0 FIREFOX_128_5_0esr_BUILD1
7 changes: 7 additions & 0 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1999,10 +1999,17 @@ pref("identity.fxaccounts.commands.remoteTabManagement.enabled", false);
// unsupported.

#ifdef MOZ_WIDEVINE_EME
pref("media.gmp-manager.chromium-update-url", "https://update.googleapis.com/service/update2/crx?response=redirect&x=id%3D%GUID%%26uc&acceptformat=crx3&updaterversion=999");
pref("media.gmp-widevinecdm.visible", true);
pref("media.gmp-widevinecdm.enabled", true);
pref("media.gmp-widevinecdm.chromium-guid", "oimompecagnajdejgnnjijobebaeigek");
pref("media.gmp-widevinecdm.force-chromium-update", false);
pref("media.gmp-widevinecdm.force-chromium-beta", false);
#if defined(MOZ_WMF_CDM) && defined(_M_AMD64)
pref("media.gmp-widevinecdm-l1.forceInstall", false);
pref("media.gmp-widevinecdm-l1.chromium-guid", "neifaoindggfcjicffkgpmnlppeffabd");
pref("media.gmp-widevinecdm-l1.force-chromium-update", false);
pref("media.gmp-widevinecdm-l1.force-chromium-beta", false);
#ifdef NIGHTLY_BUILD
pref("media.gmp-widevinecdm-l1.visible", true);
pref("media.gmp-widevinecdm-l1.enabled", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export const ContentAnalysis = {
element.ownerDocument,
"content-analysis-panel-description"
),
"content-analysis-panel-text",
"content-analysis-panel-text-styled",
{ agentName: lazy.agentName }
);
panelUI.showSubView("content-analysis-panel", element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,10 @@
"type": "boolean"
},

"MicrosoftEntraSSO": {
"type": "boolean"
},

"NetworkPrediction": {
"type": "boolean"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,5 @@ skip-if = ["(debug || asan) && os == 'linux' && bits == 64"] #Bug 1518179
["browser_timezone.js"]

["browser_exslt_timezone_load.js"]
skip-if = ["os == 'win'"] # Bug 1918104

["browser_exslt_time_precision.js"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* resistance is enabled.
*/

function getTimeZone(tab) {
function getTimeZoneOnTab(tab) {
const extractTime = function () {
const xslText = `
<xsl:stylesheet version="1.0"
Expand All @@ -28,7 +28,10 @@ function getTimeZone(tab) {
const time = styledDoc.firstChild.textContent;

SpecialPowers.Cu.getJSTestingFunctions().setTimeZone(undefined);
return time;

return time
.match(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}([+-]\d{2}:\d{2})/)
.pop();
};

const extractTimeExpr = `(${extractTime.toString()})();`;
Expand All @@ -40,7 +43,7 @@ function getTimeZone(tab) {
);
}

async function run_test(enabled) {
async function getTimeZone(enabled) {
const overrides = enabled ? "+JSDateTimeUTC" : "-JSDateTimeUTC";
await SpecialPowers.pushPrefEnv({
set: [
Expand All @@ -57,13 +60,25 @@ async function run_test(enabled) {
opening: TEST_PATH + "file_dummy.html",
});

const timeZone = await getTimeZone(tab);

const expected = enabled ? "+00:00" : "-07:00";
ok(timeZone.endsWith(expected), `Timezone is ${expected}.`);
const timeZone = await getTimeZoneOnTab(tab);

BrowserTestUtils.removeTab(tab);
SpecialPowers.Cu.getJSTestingFunctions().setTimeZone(undefined);
await SpecialPowers.popPrefEnv();

return timeZone;
}

let realTimeZone = "";
add_setup(async () => {
realTimeZone = await getTimeZone(false);
});

async function run_test(enabled) {
const timeZone = await getTimeZone(enabled);
const expected = enabled ? "+00:00" : realTimeZone;

ok(timeZone.endsWith(expected), `Timezone is ${expected}.`);
}

add_task(() => run_test(true));
Expand Down
11 changes: 9 additions & 2 deletions browser/components/search/SearchSERPTelemetry.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,9 @@ class TelemetryHandler {
}

let queries = new URLSearchParams(url.split("#")[0].split("?")[1]);
queries.forEach((v, k) => {
queries.set(k.toLowerCase(), v);
});

let isSPA = !!searchProviderInfo.isSPA;
if (isSPA) {
Expand Down Expand Up @@ -964,7 +967,7 @@ class TelemetryHandler {
let type = "organic";
let code;
if (searchProviderInfo.codeParamName) {
code = queries.get(searchProviderInfo.codeParamName);
code = queries.get(searchProviderInfo.codeParamName.toLowerCase());
if (code) {
// The code is only included if it matches one of the specific ones.
if (searchProviderInfo.taggedCodes.includes(code)) {
Expand All @@ -986,7 +989,9 @@ class TelemetryHandler {
// Especially Bing requires lots of extra work related to cookies.
for (let followOnCookie of searchProviderInfo.followOnCookies) {
if (followOnCookie.extraCodeParamName) {
let eCode = queries.get(followOnCookie.extraCodeParamName);
let eCode = queries.get(
followOnCookie.extraCodeParamName.toLowerCase()
);
if (
!eCode ||
!followOnCookie.extraCodePrefixes.some(p => eCode.startsWith(p))
Expand All @@ -1006,7 +1011,9 @@ class TelemetryHandler {
continue;
}

// Cookie values may take the form of "foo=bar&baz=1".
let [cookieParam, cookieValue] = cookie.value
.split("&")[0]
.split("=")
.map(p => p.trim());
if (
Expand Down
129 changes: 129 additions & 0 deletions browser/components/search/test/unit/test_urlTelemetry_generic.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,58 @@ const TEST_PROVIDER_INFO = [
},
],
},
{
telemetryId: "example3",
searchPageRegexp: /^https:\/\/www\.example3\.com\/search/,
queryParamNames: ["a", "q"],
codeParamName: "abc",
taggedCodes: ["ff", "tb"],
expectedOrganicCodes: ["baz"],
organicCodes: ["foo"],
followOnParamNames: ["a"],
followOnCookies: [
{
host: "www.example3.com",
name: "_dummyCookieName",
codeParamName: "abc",
extraCodePrefixes: ["xyz"],
extraCodeParamName: "dummyExtraCodeParamName",
},
],
extraAdServersRegexps: [/^https:\/\/www\.example\.com\/ad2/],
components: [
{
type: SearchSERPTelemetryUtils.COMPONENTS.AD_LINK,
default: true,
},
],
},
{
telemetryId: "example4",
searchPageRegexp: /^https:\/\/www\.example4\.com\/search/,
queryParamNames: ["a", "q"],
codeParamName: "abc",
taggedCodes: ["ff", "tb"],
expectedOrganicCodes: ["baz"],
organicCodes: ["foo"],
followOnParamNames: ["a"],
followOnCookies: [
{
host: "www.example4.com",
name: "_dummyCookieName",
codeParamName: "abc",
extraCodePrefixes: ["xyz"],
extraCodeParamName: "dummyExtraCodeParamName",
},
],
extraAdServersRegexps: [/^https:\/\/www\.example\.com\/ad2/],
components: [
{
type: SearchSERPTelemetryUtils.COMPONENTS.AD_LINK,
default: true,
},
],
},
];

const TESTS = [
Expand Down Expand Up @@ -105,6 +157,83 @@ const TESTS = [
is_signed_in: "false",
},
},
{
setUp() {
Services.cookies.removeAll();
Services.cookies.add(
"www.example3.com",
"/",
"_dummyCookieName",
"abc=tb&def=ghi",
false,
false,
false,
Date.now() + 1000 * 60 * 60,
{},
Ci.nsICookie.SAMESITE_NONE,
Ci.nsICookie.SCHEME_HTTPS
);
},
tearDown() {
Services.cookies.removeAll();
},
title: "Tagged follow-on with cookie",
trackingUrl:
"https://www.example3.com/search?q=test&a=next&dummyExtraCodeParamName=xyz",
expectedSearchCountEntry: "example3:tagged-follow-on:tb",
expectedAdKey: "example3:tagged-follow-on",
adUrls: ["https://www.example.com/ad2"],
nonAdUrls: ["https://www.example.com/ad3"],
impression: {
provider: "example3",
tagged: "true",
partner_code: "tb",
source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
is_signed_in: "false",
},
},
{
setUp() {
Services.cookies.removeAll();
Services.cookies.add(
"www.example4.com",
"/",
"_dummyCookieName",
"abc=tb&def=ghi",
false,
false,
false,
Date.now() + 1000 * 60 * 60,
{},
Ci.nsICookie.SAMESITE_NONE,
Ci.nsICookie.SCHEME_HTTPS
);
},
tearDown() {
Services.cookies.removeAll();
},
title:
"Tagged follow-on with cookie and unexpected extraCodeParam casing in URL",
trackingUrl:
"https://www.example4.com/search?q=test&a=next&DUMMYEXTRACODEPARAMNAME=xyz",
expectedSearchCountEntry: "example4:tagged-follow-on:tb",
expectedAdKey: "example4:tagged-follow-on",
adUrls: ["https://www.example.com/ad2"],
nonAdUrls: ["https://www.example.com/ad3"],
impression: {
provider: "example4",
tagged: "true",
partner_code: "tb",
source: "unknown",
is_shopping_page: "false",
is_private: "false",
shopping_tab_displayed: "false",
is_signed_in: "false",
},
},
{
title: "Organic search matched code",
trackingUrl: "https://www.example.com/search?q=test&abc=foo",
Expand Down
12 changes: 7 additions & 5 deletions browser/components/urlbar/UrlbarInput.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4418,12 +4418,13 @@ function losslessDecodeURI(aURI) {
// Encode all adjacent space chars (U+0020), to prevent spoofing attempts
// where they would push part of the URL to overflow the location bar
// (bug 1395508). A single space, or the last space if the are many, is
// preserved to maintain readability of certain urls. We only do this for the
// common space, because others may be eaten when copied to the clipboard, so
// it's safer to preserve them encoded.
// preserved to maintain readability of certain urls if it's not followed by a
// control or separator character. We only do this for the common space,
// because others may be eaten when copied to the clipboard,so it's safer to
// preserve them encoded.
value = value.replace(
// eslint-disable-next-line no-control-regex
/[\u0000-\u001f\u007f-\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u2800\u3000\ufffc]|[\r\n\t]|\u0020(?=\u0020)|\s$/g,
/[[\p{Separator}--\u0020]\p{Control}\u2800\ufffc]|\u0020(?=[\p{Other}\p{Separator}])|\s$/gv,
encodeURIComponent
);

Expand All @@ -4445,9 +4446,10 @@ function losslessDecodeURI(aURI) {
// U+1BCA0-1BCA3 (U+D82F + U+DCA0-DCA3)
// Mimicking UI parts:
// U+1F50F-1F513 (U+D83D + U+DD0F-DD13), U+1F6E1 (U+D83D + U+DEE1)
// Unassigned codepoints, sometimes shown as empty glyphs.
value = value.replace(
// eslint-disable-next-line no-misleading-character-class
/[\u00ad\u034f\u061c\u06dd\u070f\u115f\u1160\u17b4\u17b5\u180b-\u180e\u200b\u200e\u200f\u202a-\u202e\u2060-\u206f\u3164\u0600-\u0605\u08e2\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufffb]|\ud804[\udcbd\udccd]|\ud80d[\udc30-\udc38]|\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]|\ud83d[\udd0f-\udd13\udee1]/g,
/[\u00ad\u034f\u061c\u06dd\u070f\u115f\u1160\u17b4\u17b5\u180b-\u180e\u200b\u200e\u200f\u202a-\u202e\u2060-\u206f\u3164\u0600-\u0605\u08e2\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufffb\p{Unassigned}\p{Private_Use}]|\ud804[\udcbd\udccd]|\ud80d[\udc30-\udc38]|\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]|\ud83d[\udd0f-\udd13\udee1]/gv,
encodeURIComponent
);
return value;
Expand Down
4 changes: 2 additions & 2 deletions browser/components/urlbar/tests/browser/browser_copying.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ var trimHttpTests = [
},
{
loadURL: "http://example.com/a%20%C2%A0test",
expectedURL: "example.com/a %C2%A0test",
expectedURL: "example.com/a%20%C2%A0test",
copyExpected: "http://example.com/a%20%C2%A0test",
},
{
Expand Down Expand Up @@ -540,7 +540,7 @@ var trimHttpsTests = [
},
{
loadURL: "https://example.com/a%20%C2%A0test",
expectedURL: "example.com/a %C2%A0test",
expectedURL: "example.com/a%20%C2%A0test",
copyExpected: "https://example.com/a%20%C2%A0test",
},
{
Expand Down
17 changes: 0 additions & 17 deletions browser/extensions/webcompat/data/shims.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,23 +467,6 @@ const AVAILABLE_SHIMS = [
],
onlyIfBlockedByETP: true,
},
{
id: "Google SafeFrame",
platform: "all",
name: "Google SafeFrame",
bug: "1713691",
matches: [
{
patterns: [
"*://tpc.googlesyndication.com/safeframe/*/html/container.html",
"*://*.safeframe.googlesyndication.com/safeframe/*/html/container.html",
],
target: "google-safeframe.html",
types: ["sub_frame"],
},
],
onlyIfBlockedByETP: true,
},
{
id: "GoogleTrends",
platform: "all",
Expand Down
3 changes: 1 addition & 2 deletions browser/extensions/webcompat/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
"version": "133.2.0",
"version": "133.3.0",
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
Expand Down Expand Up @@ -129,7 +129,6 @@
"shims/google-ima.js",
"shims/google-page-ad.js",
"shims/google-publisher-tags.js",
"shims/google-safeframe.html",
"shims/history.js",
"shims/iam.js",
"shims/iaspet.js",
Expand Down
1 change: 0 additions & 1 deletion browser/extensions/webcompat/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ FINAL_TARGET_FILES.features["[email protected]"]["shims"] += [
"shims/google-ima.js",
"shims/google-page-ad.js",
"shims/google-publisher-tags.js",
"shims/google-safeframe.html",
"shims/history.js",
"shims/iam.js",
"shims/iaspet.js",
Expand Down
Loading

0 comments on commit 888aead

Please sign in to comment.