Backed out changeset ce16236a08a0 (bug 1932478) for bc failure on /browser_UsageTelemetry_toolbars.js
This commit is contained in:
@@ -65,7 +65,7 @@ const kSubviewEvents = ["ViewShowing", "ViewHiding"];
|
||||
* The current version. We can use this to auto-add new default widgets as necessary.
|
||||
* (would be const but isn't because of testing purposes)
|
||||
*/
|
||||
var kVersion = 21;
|
||||
var kVersion = 20;
|
||||
|
||||
/**
|
||||
* Buttons removed from built-ins by version they were removed. kVersion must be
|
||||
@@ -314,7 +314,6 @@ var CustomizableUIInternal = {
|
||||
? null
|
||||
: "home-button",
|
||||
"spring",
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"spring",
|
||||
"save-to-pocket-button",
|
||||
@@ -778,20 +777,6 @@ var CustomizableUIInternal = {
|
||||
navbarPlacements.push("reset-pbm-toolbar-button");
|
||||
}
|
||||
}
|
||||
|
||||
if (currentVersion < 21) {
|
||||
// If the vertical-spacer has not yet been added, ensure its to the left of the urlbar initially
|
||||
let navbarPlacements = gSavedState.placements[CustomizableUI.AREA_NAVBAR];
|
||||
if (!navbarPlacements.includes("vertical-spacer")) {
|
||||
let urlbarContainerPosition =
|
||||
navbarPlacements.indexOf("urlbar-container");
|
||||
gSavedState.placements[CustomizableUI.AREA_NAVBAR].splice(
|
||||
urlbarContainerPosition - 1,
|
||||
0,
|
||||
"vertical-spacer"
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_updateForNewProtonVersion() {
|
||||
|
||||
@@ -217,10 +217,7 @@ export var ToolbarContextMenu = {
|
||||
|
||||
if (
|
||||
!CustomizationHandler.isCustomizing() &&
|
||||
(toolbarItem?.localName.includes("separator") ||
|
||||
toolbarItem?.localName.includes("spring") ||
|
||||
toolbarItem?.localName.includes("spacer") ||
|
||||
toolbarItem?.id.startsWith("customizableui-special"))
|
||||
lazy.CustomizableUI.isSpecialWidget(toolbarItem?.id || "")
|
||||
) {
|
||||
moveToPanel.hidden = true;
|
||||
removeFromToolbar.hidden = true;
|
||||
|
||||
@@ -148,7 +148,6 @@ function test() {
|
||||
"back-button",
|
||||
"forward-button",
|
||||
"stop-reload-button",
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"downloads-button",
|
||||
"fxa-toolbar-menu-button",
|
||||
@@ -164,7 +163,6 @@ function test() {
|
||||
|
||||
// Finally, test the downloads and fxa avatar button migrations work.
|
||||
let oldNavbarPlacements = [
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"customizableui-special-spring3",
|
||||
"search-container",
|
||||
@@ -210,7 +208,6 @@ function test() {
|
||||
);
|
||||
|
||||
oldNavbarPlacements = [
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"customizableui-special-spring3",
|
||||
"search-container",
|
||||
@@ -224,7 +221,6 @@ function test() {
|
||||
});
|
||||
CustomizableUIInternal._updateForNewVersion();
|
||||
let expectedNavbarPlacements = [
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"customizableui-special-spring3",
|
||||
"search-container",
|
||||
|
||||
@@ -359,9 +359,9 @@ add_task(async function insertBeforeFirstItemInOverflow() {
|
||||
await TestUtils.waitForCondition(() => {
|
||||
return (
|
||||
libraryButton.getAttribute("overflowedItem") == "true" &&
|
||||
libraryButton.previousElementSibling?.id == "vertical-spacer"
|
||||
!libraryButton.previousElementSibling
|
||||
);
|
||||
}, "Library button is overflowed");
|
||||
});
|
||||
|
||||
let testBtnSpec = { id: kTestBtn4, label: "Overflowable widget test" };
|
||||
let placementOfLibraryButton = CustomizableUI.getWidgetIdsInArea(
|
||||
|
||||
@@ -40,12 +40,12 @@ add_task(async function () {
|
||||
);
|
||||
is(
|
||||
alltabsPlacement.position,
|
||||
14,
|
||||
13,
|
||||
"alltabs-button is in its original default position"
|
||||
);
|
||||
is(
|
||||
firefoxViewPlacement.position,
|
||||
13,
|
||||
12,
|
||||
"firefox-view-button is in its original default position"
|
||||
);
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ add_task(async function test_no_extensions() {
|
||||
"back-button",
|
||||
"forward-button",
|
||||
"spring",
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"save-to-pocket-button",
|
||||
"reset-pbm-toolbar-button",
|
||||
@@ -144,7 +143,6 @@ add_task(async function test_existing_browser_actions_no_movement() {
|
||||
"back-button",
|
||||
"forward-button",
|
||||
"spring",
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"save-to-pocket-button",
|
||||
"reset-pbm-toolbar-button",
|
||||
@@ -188,7 +186,6 @@ add_task(async function test_migrate_extension_buttons() {
|
||||
"back-button",
|
||||
"forward-button",
|
||||
"spring",
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"save-to-pocket-button",
|
||||
"reset-pbm-toolbar-button",
|
||||
@@ -248,7 +245,6 @@ add_task(async function test_migrate_extension_buttons_no_overwrite() {
|
||||
"back-button",
|
||||
"forward-button",
|
||||
"spring",
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"save-to-pocket-button",
|
||||
"reset-pbm-toolbar-button",
|
||||
@@ -313,7 +309,6 @@ add_task(async function test_migrate_extension_buttons_elsewhere() {
|
||||
"ext1-browser-action",
|
||||
"spring",
|
||||
"ext2-browser-action",
|
||||
"vertical-spacer",
|
||||
"urlbar-container",
|
||||
"ext3-browser-action",
|
||||
"save-to-pocket-button",
|
||||
|
||||
Reference in New Issue
Block a user