Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 9c72508

Browse files
author
smolnar
committed
Merge autoland to central. a=merge
2 parents 44ba8ee + 45a97b5 commit 9c72508

File tree

1,081 files changed

+31328
-3396
lines changed

Some content is hidden

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

1,081 files changed

+31328
-3396
lines changed

accessible/html/HTMLFormControlAccessible.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ Relation HTMLRadioButtonAccessible::ComputeGroupAttributes(
8888
RefPtr<nsContentList> inputElms;
8989

9090
nsCOMPtr<nsIFormControl> formControlNode(do_QueryInterface(mContent));
91-
dom::Element* formElm = formControlNode->GetFormElement();
92-
if (formElm)
91+
if (dom::Element* formElm = formControlNode->GetFormElement()) {
9392
inputElms = NS_GetContentList(formElm, namespaceId, tagName);
94-
else
93+
} else {
9594
inputElms = NS_GetContentList(mContent->OwnerDoc(), namespaceId, tagName);
95+
}
9696
NS_ENSURE_TRUE(inputElms, rel);
9797

9898
uint32_t inputCount = inputElms->Length(false);

browser/base/content/browser.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6359,10 +6359,6 @@ nsBrowserAccess.prototype = {
63596359
);
63606360
},
63616361

6362-
isTabContentWindow(aWindow) {
6363-
return gBrowser.browsers.some(browser => browser.contentWindow == aWindow);
6364-
},
6365-
63666362
canClose() {
63676363
return CanCloseWindow();
63686364
},
@@ -9522,6 +9518,14 @@ if (AppConstants.NIGHTLY_BUILD) {
95229518
return;
95239519
}
95249520

9521+
const openNonFissionWindowOption = Services.prefs.getBoolPref(
9522+
"fission.openNonFissionWindowOption",
9523+
false
9524+
);
9525+
if (!openNonFissionWindowOption) {
9526+
return;
9527+
}
9528+
95259529
let newFissionWindow = document.getElementById("Tools:FissionWindow");
95269530
let newNonFissionWindow = document.getElementById(
95279531
"Tools:NonFissionWindow"

browser/components/BrowserGlue.jsm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3252,7 +3252,7 @@ BrowserGlue.prototype = {
32523252
_migrateUI: function BG__migrateUI() {
32533253
// Use an increasing number to keep track of the current migration state.
32543254
// Completely unrelated to the current Firefox release number.
3255-
const UI_VERSION = 98;
3255+
const UI_VERSION = 99;
32563256
const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL;
32573257

32583258
if (!Services.prefs.prefHasUserValue("browser.migration.version")) {
@@ -3884,6 +3884,10 @@ BrowserGlue.prototype = {
38843884
Services.prefs.clearUserPref("browser.search.cohort");
38853885
}
38863886

3887+
if (currentUIVersion < 99) {
3888+
Services.prefs.clearUserPref("security.tls.version.enable-deprecated");
3889+
}
3890+
38873891
// Update the migration version.
38883892
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
38893893
},

browser/components/enterprisepolicies/tests/xpcshell/head.js

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ const { FileTestUtils } = ChromeUtils.import(
1818
const { PermissionTestUtils } = ChromeUtils.import(
1919
"resource://testing-common/PermissionTestUtils.jsm"
2020
);
21+
const { EnterprisePolicyTesting } = ChromeUtils.import(
22+
"resource://testing-common/EnterprisePolicyTesting.jsm"
23+
);
2124

2225
updateAppInfo({
2326
name: "XPCShell",
@@ -32,47 +35,15 @@ let policies = Cc["@mozilla.org/enterprisepolicies;1"].getService(
3235
);
3336
policies.observe(null, "policies-startup", null);
3437

35-
// Any changes to this function should also be made to the corresponding version
36-
// in browser/components/enterprisepolicies/tests/browser/head.js
3738
async function setupPolicyEngineWithJson(json, customSchema) {
38-
let filePath;
39-
if (typeof json == "object") {
40-
filePath = FileTestUtils.getTempFile("policies.json").path;
41-
42-
// This file gets automatically deleted by FileTestUtils
43-
// at the end of the test run.
44-
await OS.File.writeAtomic(filePath, JSON.stringify(json), {
45-
encoding: "utf-8",
46-
});
47-
} else {
48-
filePath = do_get_file(json ? json : "non-existing-file.json").path;
49-
}
50-
51-
Services.prefs.setStringPref("browser.policies.alternatePath", filePath);
52-
53-
let promise = new Promise(resolve => {
54-
Services.obs.addObserver(function observer() {
55-
Services.obs.removeObserver(
56-
observer,
57-
"EnterprisePolicies:AllPoliciesApplied"
58-
);
59-
resolve();
60-
}, "EnterprisePolicies:AllPoliciesApplied");
61-
});
62-
63-
// Clear any previously used custom schema
64-
Cu.unload("resource:///modules/policies/schema.jsm");
65-
66-
if (customSchema) {
67-
let schemaModule = ChromeUtils.import(
68-
"resource:///modules/policies/schema.jsm",
69-
null
39+
if (typeof json != "object") {
40+
let filePath = do_get_file(json ? json : "non-existing-file.json").path;
41+
return EnterprisePolicyTesting.setupPolicyEngineWithJson(
42+
filePath,
43+
customSchema
7044
);
71-
schemaModule.schema = customSchema;
7245
}
73-
74-
Services.obs.notifyObservers(null, "EnterprisePolicies:Restart");
75-
return promise;
46+
return EnterprisePolicyTesting.setupPolicyEngineWithJson(json, customSchema);
7647
}
7748

7849
function checkLockedPref(prefName, prefValue) {

browser/components/migration/360seProfileMigrator.jsm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ Bookmarks.prototype = {
206206
MigrationUtils.SOURCE_BOOKMARK_ROOTS_BOOKMARKS_TOOLBAR;
207207
let parentGuid = PlacesUtils.bookmarks.toolbarGuid;
208208
if (
209+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
209210
!MigrationUtils.isStartupMigration &&
210211
PlacesUtils.getChildCountForFolder(
211212
PlacesUtils.bookmarks.toolbarGuid

browser/components/migration/ChromeProfileMigrator.jsm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ async function GetBookmarksResource(
251251
errorGatherer
252252
);
253253
if (
254+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
254255
!MigrationUtils.isStartupMigration &&
255256
PlacesUtils.getChildCountForFolder(
256257
PlacesUtils.bookmarks.toolbarGuid
@@ -276,6 +277,7 @@ async function GetBookmarksResource(
276277
let parentGuid = PlacesUtils.bookmarks.menuGuid;
277278
let bookmarks = convertBookmarks(roots.other.children, errorGatherer);
278279
if (
280+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
279281
!MigrationUtils.isStartupMigration &&
280282
PlacesUtils.getChildCountForFolder(PlacesUtils.bookmarks.menuGuid) >
281283
PlacesUIUtils.NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE

browser/components/migration/EdgeProfileMigrator.jsm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ EdgeBookmarksMigrator.prototype = {
401401
MigrationUtils.SOURCE_BOOKMARK_ROOTS_BOOKMARKS_MENU;
402402
let parentGuid = PlacesUtils.bookmarks.menuGuid;
403403
if (
404+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
404405
!MigrationUtils.isStartupMigration &&
405406
PlacesUtils.getChildCountForFolder(parentGuid) >
406407
PlacesUIUtils.NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE
@@ -417,6 +418,7 @@ EdgeBookmarksMigrator.prototype = {
417418
MigrationUtils.SOURCE_BOOKMARK_ROOTS_BOOKMARKS_TOOLBAR;
418419
let parentGuid = PlacesUtils.bookmarks.toolbarGuid;
419420
if (
421+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
420422
!MigrationUtils.isStartupMigration &&
421423
PlacesUtils.getChildCountForFolder(parentGuid) >
422424
PlacesUIUtils.NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE

browser/components/migration/MSMigrationUtils.jsm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ Bookmarks.prototype = {
449449
}
450450

451451
if (
452+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
452453
!MigrationUtils.isStartupMigration &&
453454
PlacesUtils.getChildCountForFolder(aDestFolderGuid) >
454455
PlacesUIUtils.NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE

browser/components/migration/SafariProfileMigrator.jsm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ Bookmarks.prototype = {
150150
case this.MENU_COLLECTION: {
151151
folderGuid = PlacesUtils.bookmarks.menuGuid;
152152
if (
153+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
153154
!MigrationUtils.isStartupMigration &&
154155
PlacesUtils.getChildCountForFolder(folderGuid) >
155156
PlacesUIUtils.NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE
@@ -166,6 +167,7 @@ Bookmarks.prototype = {
166167
case this.TOOLBAR_COLLECTION: {
167168
folderGuid = PlacesUtils.bookmarks.toolbarGuid;
168169
if (
170+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020") &&
169171
!MigrationUtils.isStartupMigration &&
170172
PlacesUtils.getChildCountForFolder(folderGuid) >
171173
PlacesUIUtils.NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE

browser/components/migration/tests/unit/test_Chrome_bookmarks.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ async function testBookmarks(migratorKey, subDirs, folderName) {
9696
Assert.ok(await migrator.isSourceAvailable());
9797

9898
let itemsSeen = { bookmarks: 0, folders: 0 };
99+
let gotImportedFolderWrapper = false;
99100
let listener = events => {
100101
for (let event of events) {
101102
// "From " comes from the string `importedBookmarksFolder`
@@ -104,6 +105,7 @@ async function testBookmarks(migratorKey, subDirs, folderName) {
104105
event.itemType == PlacesUtils.bookmarks.TYPE_FOLDER
105106
) {
106107
Assert.equal(event.title, folderName, "Bookmark folder name");
108+
gotImportedFolderWrapper = true;
107109
} else {
108110
itemsSeen[
109111
event.itemType == PlacesUtils.bookmarks.TYPE_FOLDER
@@ -143,6 +145,11 @@ async function testBookmarks(migratorKey, subDirs, folderName) {
143145

144146
Assert.equal(itemsSeen.bookmarks, 200, "Should have seen 200 bookmarks.");
145147
Assert.equal(itemsSeen.folders, 10, "Should have seen 10 folders.");
148+
Assert.equal(
149+
gotImportedFolderWrapper,
150+
!Services.prefs.getBoolPref("browser.toolbars.bookmarks.2h2020"),
151+
"Should only get a 'From BrowserX' folder when the 2h2020 pref is disabled"
152+
);
146153
Assert.equal(
147154
MigrationUtils._importQuantities.bookmarks,
148155
itemsSeen.bookmarks + itemsSeen.folders,

0 commit comments

Comments
 (0)