mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 01:16:35 +00:00
Merge branch 'dev' into feature/tab-rename
This commit is contained in:
@@ -1,8 +1,24 @@
|
||||
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
|
||||
index 2de73e75bf98b21dde9ec05213a66f9e9039200f..04ab3ea4c47d674778e8965654867c4cf0f99161 100644
|
||||
index b888a753a7f23a9800fe04da51a4e6b898314ff2..35eea774e1ea4b1807ec65ebc767f423d81602bd 100644
|
||||
--- a/browser/components/BrowserGlue.sys.mjs
|
||||
+++ b/browser/components/BrowserGlue.sys.mjs
|
||||
@@ -4643,6 +4643,7 @@ BrowserGlue.prototype = {
|
||||
@@ -121,6 +121,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
WindowsGPOParser: "resource://gre/modules/policies/WindowsGPOParser.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
+ gZenUIMigration: "chrome://browser/content/zen-components/ZenUIMigration.mjs",
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
@@ -1951,6 +1952,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
lazy.UrlbarPrefs.updateFirefoxSuggestScenario();
|
||||
|
||||
+ lazy.gZenUIMigration.init(this._isNewProfile, aWindow);
|
||||
// A channel for "remote troubleshooting" code...
|
||||
let channel = new lazy.WebChannel(
|
||||
"remote-troubleshooting",
|
||||
@@ -4761,6 +4763,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
async _maybeShowDefaultBrowserPrompt() {
|
||||
@@ -10,7 +26,7 @@ index 2de73e75bf98b21dde9ec05213a66f9e9039200f..04ab3ea4c47d674778e8965654867c4c
|
||||
// Highest priority is about:welcome window modal experiment
|
||||
// Second highest priority is the upgrade dialog, which can include a "primary
|
||||
// browser" request and is limited in various ways, e.g., major upgrades.
|
||||
@@ -5169,6 +5170,16 @@ BrowserGlue.prototype = {
|
||||
@@ -5302,6 +5305,16 @@ BrowserGlue.prototype = {
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js
|
||||
index 1937a01b9940c79782cc2ad002b09ea5938b89e0..0846ab4b3750a556617ff8d4546d9131cda35296 100644
|
||||
index 1937a01b9940c79782cc2ad002b09ea5938b89e0..a702e8c520fad651a98615215f94657b7e1c58eb 100644
|
||||
--- a/browser/components/sidebar/browser-sidebar.js
|
||||
+++ b/browser/components/sidebar/browser-sidebar.js
|
||||
@@ -671,7 +671,7 @@ var SidebarController = {
|
||||
@@ -11,3 +11,12 @@ index 1937a01b9940c79782cc2ad002b09ea5938b89e0..0846ab4b3750a556617ff8d4546d9131
|
||||
[...browser.children].forEach((node, i) => {
|
||||
node.style.order = i + 1;
|
||||
});
|
||||
@@ -681,7 +681,7 @@ var SidebarController = {
|
||||
// DOM ordering is: sidebar-main | launcher-splitter | sidebar-box | splitter | tabbrowser-tabbox |
|
||||
// Want to display as: | tabbrowser-tabbox | splitter | sidebar-box | launcher-splitter | sidebar-main
|
||||
// So we just swap box and tabbrowser-tabbox ordering and move sidebar-main to the end
|
||||
- let tabbox = document.getElementById("tabbrowser-tabbox");
|
||||
+ let tabbox = document.getElementById("tabbrowser-tabpanels");
|
||||
let boxOrdinal = this._box.style.order;
|
||||
this._box.style.order = tabbox.style.order;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857a82ff94c 100644
|
||||
index 8aeb244ffca9f48661805f5b7d860b5896055562..1d630f0f402610e70e4e17f11813fddbd141cb9e 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -94,7 +94,7 @@
|
||||
@@ -101,7 +101,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
) {
|
||||
delete draggedTab._dragData;
|
||||
return;
|
||||
@@ -1512,9 +1525,18 @@
|
||||
@@ -1512,9 +1525,19 @@
|
||||
}
|
||||
|
||||
this.#allTabs = [
|
||||
@@ -109,19 +109,20 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
+ ...document.getElementById("zen-essentials-container").children, ...this.verticalPinnedTabsContainer.children,
|
||||
...children,
|
||||
];
|
||||
+ const lastPinnedTabIdx = gBrowser.pinnedTabCount;
|
||||
+ for (let i = 0; i < this.#allTabs.length; i++) {
|
||||
+ // add glance tabs (tabs inside tabs) to the list
|
||||
+ const glanceTab = this.#allTabs[i].querySelector("tab[zen-glance-tab]");
|
||||
+ if (glanceTab) {
|
||||
+ // insert right after the parent tab
|
||||
+ this.#allTabs.splice(i + 1, 0, glanceTab);
|
||||
+ this.#allTabs.splice(Math.min(i + 1, lastPinnedTabIdx), 0, glanceTab);
|
||||
+ i++;
|
||||
+ }
|
||||
+ }
|
||||
return this.#allTabs;
|
||||
}
|
||||
|
||||
@@ -1593,6 +1615,7 @@
|
||||
@@ -1593,6 +1616,7 @@
|
||||
}
|
||||
|
||||
this.#focusableItems = [
|
||||
@@ -129,7 +130,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
...verticalPinnedTabsContainer.children,
|
||||
...focusableItems,
|
||||
];
|
||||
@@ -1617,8 +1640,8 @@
|
||||
@@ -1617,8 +1641,8 @@
|
||||
#isContainerVerticalPinnedExpanded(tab) {
|
||||
return (
|
||||
this.verticalMode &&
|
||||
@@ -140,7 +141,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1816,7 +1839,7 @@
|
||||
@@ -1816,7 +1840,7 @@
|
||||
let rect = ele => {
|
||||
return window.windowUtils.getBoundsWithoutFlushing(ele);
|
||||
};
|
||||
@@ -149,7 +150,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
if (tab && rect(tab).width <= this._tabClipWidth) {
|
||||
this.setAttribute("closebuttons", "activetab");
|
||||
} else {
|
||||
@@ -1832,6 +1855,7 @@
|
||||
@@ -1832,6 +1856,7 @@
|
||||
this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant);
|
||||
}
|
||||
|
||||
@@ -157,7 +158,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -1843,7 +1867,7 @@
|
||||
@@ -1843,7 +1868,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
if (!tabs.length) {
|
||||
return;
|
||||
}
|
||||
@@ -1879,7 +1903,7 @@
|
||||
@@ -1879,7 +1904,7 @@
|
||||
if (isEndTab && !this._hasTabTempMaxWidth) {
|
||||
return;
|
||||
}
|
||||
@@ -175,7 +176,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
// Force tabs to stay the same width, unless we're closing the last tab,
|
||||
// which case we need to let them expand just enough so that the overall
|
||||
// tabbar width is the same.
|
||||
@@ -1894,7 +1918,7 @@
|
||||
@@ -1894,7 +1919,7 @@
|
||||
let tabsToReset = [];
|
||||
for (let i = numPinned; i < tabs.length; i++) {
|
||||
let tab = tabs[i];
|
||||
@@ -184,7 +185,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
if (!isEndTab) {
|
||||
// keep tabs the same width
|
||||
tab.style.transition = "none";
|
||||
@@ -1963,13 +1987,13 @@
|
||||
@@ -1963,13 +1988,13 @@
|
||||
let verticalTabsContainer = document.getElementById(
|
||||
"vertical-pinned-tabs-container"
|
||||
);
|
||||
@@ -202,7 +203,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1992,8 +2016,8 @@
|
||||
@@ -1992,8 +2017,8 @@
|
||||
}
|
||||
|
||||
_positionPinnedTabs() {
|
||||
@@ -213,7 +214,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
let absPositionHorizontalTabs =
|
||||
this.overflowing && tabs.length > numPinned && numPinned > 0;
|
||||
|
||||
@@ -2074,7 +2098,7 @@
|
||||
@@ -2074,7 +2099,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -222,7 +223,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -2257,9 +2281,9 @@
|
||||
@@ -2257,9 +2282,9 @@
|
||||
}
|
||||
|
||||
let pinned = draggedTab.pinned;
|
||||
@@ -235,7 +236,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
pinned ? numPinned : undefined
|
||||
);
|
||||
|
||||
@@ -2502,8 +2526,9 @@
|
||||
@@ -2502,8 +2527,9 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -247,7 +248,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2668,9 +2693,9 @@
|
||||
@@ -2668,9 +2694,9 @@
|
||||
function newIndex(aTab, index) {
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
@@ -259,7 +260,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2754,7 +2779,7 @@
|
||||
@@ -2754,7 +2780,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
@@ -268,7 +269,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2772,12 +2797,14 @@
|
||||
@@ -2772,12 +2798,14 @@
|
||||
selectedTab = {
|
||||
left: selectedTab.left,
|
||||
right: selectedTab.right,
|
||||
@@ -284,7 +285,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
selectedTab,
|
||||
];
|
||||
})
|
||||
@@ -2794,8 +2821,11 @@
|
||||
@@ -2794,8 +2822,11 @@
|
||||
delete this._lastTabToScrollIntoView;
|
||||
// Is the new tab already completely visible?
|
||||
if (
|
||||
@@ -298,7 +299,7 @@ index 8aeb244ffca9f48661805f5b7d860b5896055562..ad28d73fe7cc6eadc4b4724c75d54857
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -2803,21 +2833,29 @@
|
||||
@@ -2803,21 +2834,29 @@
|
||||
if (this.arrowScrollbox.smoothScroll) {
|
||||
// Can we make both the new tab and the selected tab completely visible?
|
||||
if (
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a726c67e873 100644
|
||||
index 50968dc04b527438acf30151f0c2e92f8b45097c..0d4c899a8a0d98d6cac41ecdd1c40df52bd050be 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -16,7 +16,19 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
|
||||
const SEARCH_BUTTON_CLASS = "urlbar-search-button";
|
||||
|
||||
@@ -424,6 +431,10 @@ export class UrlbarInput {
|
||||
@@ -348,7 +355,11 @@ export class UrlbarInput {
|
||||
// See _on_select(). HTMLInputElement.select() dispatches a "select"
|
||||
// event but does not set the primary selection.
|
||||
this._suppressPrimaryAdjustment = true;
|
||||
+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", true);
|
||||
this.inputField.select();
|
||||
+ this.document.ownerGlobal.setTimeout(() => {
|
||||
+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment");
|
||||
+ }, 0);
|
||||
this._suppressPrimaryAdjustment = false;
|
||||
}
|
||||
|
||||
@@ -424,6 +435,10 @@ export class UrlbarInput {
|
||||
hideSearchTerms = false,
|
||||
isSameDocument = false
|
||||
) {
|
||||
@@ -27,7 +39,20 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
// We only need to update the searchModeUI on tab switch conditionally
|
||||
// as we only persist searchMode with ScotchBonnet enabled.
|
||||
if (
|
||||
@@ -1087,7 +1098,11 @@ export class UrlbarInput {
|
||||
@@ -697,8 +712,11 @@ export class UrlbarInput {
|
||||
return;
|
||||
}
|
||||
}
|
||||
-
|
||||
+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", true);
|
||||
this.handleNavigation({ event });
|
||||
+ this.document.ownerGlobal.setTimeout(() => {
|
||||
+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment");
|
||||
+ }, 200);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1087,11 +1105,14 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
if (!result.payload.providesSearchMode) {
|
||||
@@ -40,7 +65,11 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
}
|
||||
|
||||
this.controller.recordSelectedResult(event, result);
|
||||
@@ -2144,6 +2159,11 @@ export class UrlbarInput {
|
||||
-
|
||||
if (isCanonized) {
|
||||
this.controller.engagementEvent.record(event, {
|
||||
result,
|
||||
@@ -2144,6 +2165,11 @@ export class UrlbarInput {
|
||||
|
||||
this.setAttribute("breakout-extend", "true");
|
||||
|
||||
@@ -52,7 +81,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
// Enable the animation only after the first extend call to ensure it
|
||||
// doesn't run when opening a new window.
|
||||
if (!this.hasAttribute("breakout-extend-animate")) {
|
||||
@@ -2163,6 +2183,11 @@ export class UrlbarInput {
|
||||
@@ -2163,6 +2189,11 @@ export class UrlbarInput {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,7 +93,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
this.removeAttribute("breakout-extend");
|
||||
this.#updateTextboxPosition();
|
||||
}
|
||||
@@ -3305,7 +3330,7 @@ export class UrlbarInput {
|
||||
@@ -3305,7 +3336,7 @@ export class UrlbarInput {
|
||||
} else {
|
||||
where = lazy.BrowserUtils.whereToOpenLink(event, false, false);
|
||||
}
|
||||
@@ -73,7 +102,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
if (where == "current") {
|
||||
where = "tab";
|
||||
} else if (where == "tab") {
|
||||
@@ -3859,6 +3884,11 @@ export class UrlbarInput {
|
||||
@@ -3859,6 +3890,11 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
@@ -85,7 +114,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
if (
|
||||
event.target == this.inputField ||
|
||||
event.target == this._inputContainer ||
|
||||
@@ -3930,7 +3960,7 @@ export class UrlbarInput {
|
||||
@@ -3930,7 +3966,7 @@ export class UrlbarInput {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +123,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
this.view.autoOpen({ event });
|
||||
} else {
|
||||
if (this._untrimOnFocusAfterKeydown) {
|
||||
@@ -3970,9 +4000,12 @@ export class UrlbarInput {
|
||||
@@ -3970,9 +4006,12 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_mousedown(event) {
|
||||
@@ -108,7 +137,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72
|
||||
|
||||
if (
|
||||
event.target != this.inputField &&
|
||||
@@ -3982,8 +4015,8 @@ export class UrlbarInput {
|
||||
@@ -3982,8 +4021,8 @@ export class UrlbarInput {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user