Skip to content

Commit 0e84375

Browse files
Merge pull request #1565 from Floorp-Projects/upstream-esr128-20250107115437
Pull upstream
2 parents 2a4ee86 + 7f87430 commit 0e84375

File tree

138 files changed

+5299
-4905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+5299
-4905
lines changed

.hgtags

+7
Original file line numberDiff line numberDiff line change
@@ -5088,3 +5088,10 @@ e0c969a3bfc0a23219384269e5b36a589c8f6cc5 FIREFOX_128_3_1esr_RELEASE
50885088
c4a5d008ee64fab523384408fa2868e2d028025d FIREFOX_128_4_0esr_BUILD1
50895089
c4a5d008ee64fab523384408fa2868e2d028025d FIREFOX_128_4_0esr_RELEASE
50905090
68352da82b95d7114af99b268c179195fd2fead0 FIREFOX_128_5_0esr_BUILD1
5091+
68352da82b95d7114af99b268c179195fd2fead0 FIREFOX_128_5_0esr_RELEASE
5092+
a6cdcd2ed9ec3e256f358010672bafd1674b0b8b FIREFOX_128_5_1esr_BUILD1
5093+
a6cdcd2ed9ec3e256f358010672bafd1674b0b8b FIREFOX_128_5_1esr_RELEASE
5094+
f2cc51880bf4f49bfe087a2cc569388cab97242e FIREFOX_128_5_2esr_BUILD1
5095+
f2cc51880bf4f49bfe087a2cc569388cab97242e FIREFOX_128_5_2esr_RELEASE
5096+
4f008c71b12e001ae54b7fcd4787b266764c28bf FIREFOX_128_6_0esr_BUILD1
5097+
4f008c71b12e001ae54b7fcd4787b266764c28bf FIREFOX_128_6_0esr_RELEASE

CLOBBER

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
2323
# don't change CLOBBER for WebIDL changes any more.
2424

25-
Merge day clobber 2024-10-28
25+
Merge day clobber 2025-01-06

accessible/windows/ia2/ia2Accessible.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
#include "AccessibleStates.h"
1313

1414
#include "AccAttributes.h"
15+
#include "ApplicationAccessible.h"
1516
#include "Compatibility.h"
1617
#include "ia2AccessibleRelation.h"
1718
#include "IUnknownImpl.h"
1819
#include "nsCoreUtils.h"
1920
#include "nsIAccessibleTypes.h"
2021
#include "mozilla/a11y/PDocAccessible.h"
22+
#include "mozilla/StaticPrefs_accessibility.h"
2123
#include "Relation.h"
2224
#include "TextRange-inl.h"
2325
#include "nsAccessibilityService.h"
@@ -352,6 +354,22 @@ ia2Accessible::get_windowHandle(HWND* aWindowHandle) {
352354
if (!acc) return CO_E_OBJNOTCONNECTED;
353355

354356
*aWindowHandle = MsaaAccessible::GetHWNDFor(acc);
357+
if (!*aWindowHandle && !StaticPrefs::accessibility_uia_enable()) {
358+
// Bug 1890155: This can happen if a document is detached from its embedder.
359+
// The document might be about to die or it might be moving to a different
360+
// embedder; e.g. a tab in a different window. The IA2 -> UIA proxy may
361+
// crash if we return a null HWND. For now, pick an arbitrary top level
362+
// Gecko HWND. This might be wrong, but only briefly, since the document
363+
// will either die or move very soon, at which point this method will
364+
// return the correct answer.
365+
// TODO This hack should be removed once we only use our native UIA
366+
// implementation.
367+
if (ApplicationAccessible* app = ApplicationAcc()) {
368+
if (LocalAccessible* firstRoot = app->LocalFirstChild()) {
369+
*aWindowHandle = MsaaAccessible::GetHWNDFor(firstRoot);
370+
}
371+
}
372+
}
355373
return S_OK;
356374
}
357375

browser/app/profile/firefox.js

-10
Original file line numberDiff line numberDiff line change
@@ -1194,15 +1194,9 @@ pref("network.manage-offline-status", true);
11941194

11951195
// We want to make sure mail URLs are handled externally...
11961196
pref("network.protocol-handler.external.mailto", true); // for mail
1197-
#ifdef XP_WIN
1198-
pref("network.protocol-handler.external.ms-windows-store", true);
1199-
#endif
12001197

12011198
// ...without warning dialogs
12021199
pref("network.protocol-handler.warn-external.mailto", false);
1203-
#ifdef XP_WIN
1204-
pref("network.protocol-handler.warn-external.ms-windows-store", false);
1205-
#endif
12061200

12071201
// By default, all protocol handlers are exposed. This means that
12081202
// the browser will respond to openURL commands for all URL types.
@@ -2427,10 +2421,6 @@ pref("signon.showAutoCompleteFooter", true);
24272421
pref("signon.showAutoCompleteImport", "import");
24282422
pref("signon.suggestImportCount", 3);
24292423

2430-
// Space separated list of URLS that are allowed to send objects (instead of
2431-
// only strings) through webchannels. Bug 1275612 tracks removing this pref and capability.
2432-
pref("webchannel.allowObject.urlWhitelist", "https://content.cdn.mozilla.net https://install.mozilla.org");
2433-
24342424
// Whether or not the browser should scan for unsubmitted
24352425
// crash reports, and then show a notification for submitting
24362426
// those reports.

browser/base/content/test/general/browser_remoteTroubleshoot.js

-14
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ const TEST_URL_TAIL =
1313
"example.com/browser/browser/base/content/test/general/test_remoteTroubleshoot.html";
1414
const TEST_URI_GOOD = Services.io.newURI("https://" + TEST_URL_TAIL);
1515
const TEST_URI_BAD = Services.io.newURI("http://" + TEST_URL_TAIL);
16-
const TEST_URI_GOOD_OBJECT = Services.io.newURI(
17-
"https://" + TEST_URL_TAIL + "?object"
18-
);
1916

2017
// Creates a one-shot web-channel for the test data to be sent back from the test page.
2118
function promiseChannelResponse(channelID, originOrPermission) {
@@ -116,15 +113,4 @@ add_task(async function () {
116113
got.message.errno === 2,
117114
"should have failed with errno 2, no such channel"
118115
);
119-
120-
// Check that the page can send an object as well if it's in the whitelist
121-
let webchannelWhitelistPref = "webchannel.allowObject.urlWhitelist";
122-
let origWhitelist = Services.prefs.getCharPref(webchannelWhitelistPref);
123-
let newWhitelist = origWhitelist + " https://example.com";
124-
Services.prefs.setCharPref(webchannelWhitelistPref, newWhitelist);
125-
registerCleanupFunction(() => {
126-
Services.prefs.clearUserPref(webchannelWhitelistPref);
127-
});
128-
got = await promiseNewChannelResponse(TEST_URI_GOOD_OBJECT);
129-
Assert.ok(got.message, "should have gotten some data back");
130116
});

browser/base/content/test/general/test_remoteTroubleshoot.html

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
<!DOCTYPE HTML>
22
<html>
33
<script>
4-
// This test is run multiple times, once with only strings allowed through the
5-
// WebChannel, and once with objects allowed. This function allows us to handle
6-
// both cases without too much pain.
7-
function makeDetails(object) {
8-
if (window.location.search.includes("object")) {
9-
return object;
10-
}
11-
return JSON.stringify(object);
12-
}
134
// Add a listener for responses to our remote requests.
145
window.addEventListener("WebChannelMessageToContent", function(event) {
156
if (event.detail.id == "remote-troubleshooting") {
167
// Send what we got back to the test.
178
var backEvent = new window.CustomEvent("WebChannelMessageToChrome", {
18-
detail: makeDetails({
9+
detail: JSON.stringify({
1910
id: "test-remote-troubleshooting-backchannel",
2011
message: {
2112
message: event.detail.message,
@@ -32,7 +23,7 @@
3223
// Make a request for the troubleshooting data as we load.
3324
window.onload = function() {
3425
var event = new window.CustomEvent("WebChannelMessageToChrome", {
35-
detail: makeDetails({
26+
detail: JSON.stringify({
3627
id: "remote-troubleshooting",
3728
message: {
3829
command: "request",

browser/components/enterprisepolicies/Policies.sys.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -1864,6 +1864,7 @@ export var Policies = {
18641864
"general.smoothScroll",
18651865
"geo.",
18661866
"gfx.",
1867+
"identity.fxaccounts.toolbar.",
18671868
"intl.",
18681869
"keyword.enabled",
18691870
"layers.",

browser/components/places/tests/browser/browser_bookmark_copy_folder_tree.js

+27
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ add_task(async function () {
1414
await PlacesUtils.bookmarks.eraseEverything();
1515
});
1616

17+
if (AppConstants.platform === "win") {
18+
if (Services.env.get("MOZ_AUTOMATION")) {
19+
// When running in CI, pre-emptively kill Windows Explorer, using system
20+
// from the standard library, since it sometimes holds the clipboard for
21+
// long periods, thereby breaking the test (bug 1921759).
22+
const { ctypes } = ChromeUtils.importESModule(
23+
"resource://gre/modules/ctypes.sys.mjs"
24+
);
25+
let libc = ctypes.open("ucrtbase.dll");
26+
let exec = libc.declare(
27+
"system",
28+
ctypes.default_abi,
29+
ctypes.int,
30+
ctypes.char.ptr
31+
);
32+
let rv = exec(
33+
'"powershell -command "&{&Stop-Process -ProcessName explorer}"'
34+
);
35+
libc.close();
36+
is(rv, 0, "Launched powershell to stop explorer.exe");
37+
} else {
38+
info(
39+
"Skipping terminating Windows Explorer since we are not running in automation"
40+
);
41+
}
42+
}
43+
1744
await withSidebarTree("bookmarks", async function (tree) {
1845
const selectedNodeComparator = {
1946
equalTitle: itemNode => {

browser/components/shopping/tests/browser/browser.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ prefs = [
7070
["browser_stale_product.js"]
7171

7272
["browser_ui_telemetry.js"]
73-
skip-if = [
74-
"os == 'linux' && os_version == '18.04'"
75-
]
73+
skip-if = ["true"]
7674

7775
["browser_unanalyzed_product.js"]
7876

browser/config/version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
128.5.0
1+
128.7.0

browser/config/version_display.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.21.0
1+
11.22.0

build/moz.configure/bootstrap.configure

+4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def bootstrap_toolchain_tasks(host):
9292
result = {
9393
"index": t.optimization["index-search"],
9494
"artifact": t.attributes["toolchain-artifact"],
95+
"extract": t.attributes.get("toolchain-extract", True),
9596
}
9697
command = t.attributes.get("toolchain-command")
9798
if command:
@@ -219,6 +220,9 @@ def bootstrap_path(path, **kwargs):
219220
"--from-task",
220221
f"{task_id}:{artifact}",
221222
]
223+
if not task["extract"]:
224+
command.append("--no-unpack")
225+
222226
elif command:
223227
# For private local toolchains, run the associated command.
224228
command = (

config/milestone.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
# hardcoded milestones in the tree from these two files.
1111
#--------------------------------------------------------
1212

13-
128.5.0
13+
128.7.0

docshell/base/nsDocShell.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -6156,9 +6156,13 @@ nsresult nsDocShell::FilterStatusForErrorPage(
61566156
if (aStatus == NS_ERROR_UNKNOWN_PROTOCOL) {
61576157
// For unknown protocols we only display an error if the load is triggered
61586158
// by the browser itself. Showing the error for page-triggered navigations
6159-
// causes annoying behavior for users, see bug 1528305.
6159+
// causes annoying behavior for users when a page tries to open an external
6160+
// app which has not been installed, see bug 1528305. A missing WebExtension
6161+
// protocol handlers will however always load the error page, as it is not
6162+
// expected to be opened externally, see bug 1921426.
61606163
nsCOMPtr<nsILoadInfo> info = aChannel->LoadInfo();
6161-
if (!info->TriggeringPrincipal()->IsSystemPrincipal()) {
6164+
if (!info->TriggeringPrincipal()->IsSystemPrincipal() &&
6165+
!BasePrincipal::Cast(info->TriggeringPrincipal())->AddonPolicy()) {
61626166
if (aSkippedUnknownProtocolNavigation) {
61636167
*aSkippedUnknownProtocolNavigation = true;
61646168
}

dom/base/StructuredCloneHolder.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1369,14 +1369,14 @@ StructuredCloneHolder::CustomReadTransferHandler(
13691369
static_cast<OffscreenCanvasCloneData*>(aContent);
13701370
RefPtr<OffscreenCanvas> canvas =
13711371
OffscreenCanvas::CreateFromCloneData(mGlobal, data);
1372-
delete data;
13731372

13741373
JS::Rooted<JS::Value> value(aCx);
13751374
if (!GetOrCreateDOMReflector(aCx, canvas, &value)) {
13761375
JS_ClearPendingException(aCx);
13771376
return false;
13781377
}
13791378

1379+
delete data;
13801380
aReturnObject.set(&value.toObject());
13811381
return true;
13821382
}
@@ -1390,14 +1390,14 @@ StructuredCloneHolder::CustomReadTransferHandler(
13901390
ImageBitmapCloneData* data = static_cast<ImageBitmapCloneData*>(aContent);
13911391
RefPtr<ImageBitmap> bitmap =
13921392
ImageBitmap::CreateFromCloneData(mGlobal, data);
1393-
delete data;
13941393

13951394
JS::Rooted<JS::Value> value(aCx);
13961395
if (!GetOrCreateDOMReflector(aCx, bitmap, &value)) {
13971396
JS_ClearPendingException(aCx);
13981397
return false;
13991398
}
14001399

1400+
delete data;
14011401
aReturnObject.set(&value.toObject());
14021402
return true;
14031403
}
@@ -1466,14 +1466,14 @@ StructuredCloneHolder::CustomReadTransferHandler(
14661466
if (!frame) {
14671467
return false;
14681468
}
1469-
delete data;
1470-
aContent = nullptr;
14711469

14721470
JS::Rooted<JS::Value> value(aCx);
14731471
if (!GetOrCreateDOMReflector(aCx, frame, &value)) {
14741472
JS_ClearPendingException(aCx);
14751473
return false;
14761474
}
1475+
delete data;
1476+
aContent = nullptr;
14771477
aReturnObject.set(&value.toObject());
14781478
return true;
14791479
}
@@ -1499,14 +1499,14 @@ StructuredCloneHolder::CustomReadTransferHandler(
14991499
if (!audioData) {
15001500
return false;
15011501
}
1502-
delete data;
1503-
aContent = nullptr;
15041502

15051503
JS::Rooted<JS::Value> value(aCx);
15061504
if (!GetOrCreateDOMReflector(aCx, audioData, &value)) {
15071505
JS_ClearPendingException(aCx);
15081506
return false;
15091507
}
1508+
delete data;
1509+
aContent = nullptr;
15101510
aReturnObject.set(&value.toObject());
15111511
return true;
15121512
}

dom/base/nsLineBreaker.cpp

+10-6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "mozilla/intl/LineBreaker.h" // for LineBreaker::ComputeBreakPositions
1616
#include "mozilla/intl/Locale.h"
1717
#include "mozilla/intl/UnicodeProperties.h"
18+
#include "mozilla/ScopeExit.h"
1819
#include "mozilla/StaticPrefs_intl.h"
1920

2021
using mozilla::AutoRestore;
@@ -150,6 +151,15 @@ static void SetupCapitalization(const char16_t* aWord, uint32_t aLength,
150151
}
151152

152153
nsresult nsLineBreaker::FlushCurrentWord() {
154+
auto cleanup = mozilla::MakeScopeExit([&] {
155+
mCurrentWord.Clear();
156+
mTextItems.Clear();
157+
mCurrentWordMightBeBreakable = false;
158+
mCurrentWordContainsMixedLang = false;
159+
mCurrentWordLanguage = nullptr;
160+
mWordContinuation = false;
161+
});
162+
153163
uint32_t length = mCurrentWord.Length();
154164
AutoTArray<uint8_t, 4000> breakState;
155165
if (!breakState.AppendElements(length, mozilla::fallible)) {
@@ -232,12 +242,6 @@ nsresult nsLineBreaker::FlushCurrentWord() {
232242
offset += ti->mLength;
233243
}
234244

235-
mCurrentWord.Clear();
236-
mTextItems.Clear();
237-
mCurrentWordMightBeBreakable = false;
238-
mCurrentWordContainsMixedLang = false;
239-
mCurrentWordLanguage = nullptr;
240-
mWordContinuation = false;
241245
return NS_OK;
242246
}
243247

dom/canvas/DrawTargetWebgl.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -3048,7 +3048,12 @@ static inline AAStroke::LineCap ToAAStrokeLineCap(CapStyle aCap) {
30483048
}
30493049

30503050
static inline Point WGRPointToPoint(const WGR::Point& aPoint) {
3051-
return Point(IntPoint(aPoint.x, aPoint.y)) * (1.0f / 16.0f);
3051+
// WGR points are 28.4 fixed-point where (0.0, 0.0) is assumed to be a pixel
3052+
// center, as opposed to (0.5, 0.5) in canvas device space. WGR thus shifts
3053+
// each point by (-0.5, -0.5). To undo this, transform from fixed-point back
3054+
// to floating-point, and reverse the pixel shift by adding back (0.5, 0.5).
3055+
return Point(IntPoint(aPoint.x, aPoint.y)) * (1.0f / 16.0f) +
3056+
Point(0.5f, 0.5f);
30523057
}
30533058

30543059
// Generates a vertex buffer for a stroked path using aa-stroke.

dom/html/HTMLInputElement.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5717,7 +5717,7 @@ Nullable<uint32_t> HTMLInputElement::GetSelectionStart(ErrorResult& aRv) {
57175717
}
57185718

57195719
uint32_t HTMLInputElement::GetSelectionStartIgnoringType(ErrorResult& aRv) {
5720-
uint32_t selEnd, selStart;
5720+
uint32_t selEnd = 0, selStart = 0;
57215721
GetSelectionRange(&selStart, &selEnd, aRv);
57225722
return selStart;
57235723
}
@@ -5748,7 +5748,7 @@ Nullable<uint32_t> HTMLInputElement::GetSelectionEnd(ErrorResult& aRv) {
57485748
}
57495749

57505750
uint32_t HTMLInputElement::GetSelectionEndIgnoringType(ErrorResult& aRv) {
5751-
uint32_t selEnd, selStart;
5751+
uint32_t selEnd = 0, selStart = 0;
57525752
GetSelectionRange(&selStart, &selEnd, aRv);
57535753
return selEnd;
57545754
}

dom/media/eme/mediafoundation/WMFCDMImpl.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ RefPtr<WMFCDMImpl::InitPromise> WMFCDMImpl::Init(
2020
const WMFCDMImpl::InitParams& aParams) {
2121
if (!mCDM) {
2222
mCDM = MakeRefPtr<MFCDMChild>(mKeySystem);
23+
mCDM->EnsureRemote();
2324
}
2425
RefPtr<WMFCDMImpl> self = this;
2526
mCDM->Init(aParams.mOrigin, aParams.mInitDataTypes,
@@ -58,6 +59,7 @@ WMFCDMCapabilites::GetCapabilities(
5859
nsTArray<RefPtr<CapabilitiesPromise>> promises;
5960
for (const auto& request : aRequests) {
6061
RefPtr<MFCDMChild> cdm = new MFCDMChild(request.mKeySystem);
62+
cdm->EnsureRemote();
6163
promises.AppendElement(cdm->GetCapabilities(MFCDMCapabilitiesRequest{
6264
nsString{request.mKeySystem},
6365
request.mDecryption == KeySystemConfig::DecryptionInfo::Hardware,

0 commit comments

Comments
 (0)