mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-14 04:40:29 +00:00
Merge branch 'dev' into media-control
This commit is contained in:
@@ -186,6 +186,7 @@ pref('zen.sidebar.data', "{\"data\":\n {\"p1\":{\n \"url\":\"https://www.wikip
|
||||
pref('zen.sidebar.enabled', true);
|
||||
pref('zen.sidebar.close-on-blur', true);
|
||||
pref('zen.sidebar.max-webpanels', 8);
|
||||
pref('zen.sidebar.use-google-favicons', true);
|
||||
|
||||
// Zen Split View
|
||||
pref('zen.splitView.enable-tab-drop', true);
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
openWatermark() {
|
||||
if (!Services.prefs.getBoolPref('zen.watermark.enabled', false)) {
|
||||
document.documentElement.removeAttribute('zen-before-loaded');
|
||||
return;
|
||||
}
|
||||
for (let elem of document.querySelectorAll('#browser > *, #urlbar')) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -19,12 +19,6 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.watermark.enabled') {
|
||||
#zen-watermark {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#customization-footer #customization-toolbar-visibility-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
10
src/browser/base/moz-build.patch
Normal file
10
src/browser/base/moz-build.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
diff --git a/browser/base/moz.build b/browser/base/moz.build
|
||||
index 636e0841786735a63ddea00e819c0b6f0b8a5d4d..6685d857180944d68bf4f049919f81361084c481 100644
|
||||
--- a/browser/base/moz.build
|
||||
+++ b/browser/base/moz.build
|
||||
@@ -87,3 +87,5 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk"):
|
||||
DEFINES["MENUBAR_CAN_AUTOHIDE"] = 1
|
||||
|
||||
JAR_MANIFESTS += ["jar.mn"]
|
||||
+
|
||||
+DIRS += ["zen-components"]
|
||||
@@ -211,6 +211,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
let { permitUnload } = this.#currentBrowser.permitUnload();
|
||||
if (!permitUnload) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (onTabClose && hasFocused && !this.#confirmationTimeout) {
|
||||
const cancelButton = document.getElementById('zen-glance-sidebar-close');
|
||||
cancelButton.setAttribute('waitconfirmation', true);
|
||||
@@ -300,7 +305,6 @@
|
||||
}
|
||||
|
||||
// reset everything
|
||||
const prevOverlay = this.overlay;
|
||||
this.browserWrapper = null;
|
||||
this.overlay = null;
|
||||
this.contentWrapper = null;
|
||||
@@ -312,7 +316,7 @@
|
||||
gBrowser.selectedTab = this.#currentParentTab;
|
||||
}
|
||||
this._ignoreClose = true;
|
||||
gBrowser.removeTab(this.lastCurrentTab, { animate: true });
|
||||
gBrowser.removeTab(this.lastCurrentTab, { animate: true, skipPermitUnload: true });
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
|
||||
this.#currentParentTab.removeAttribute('glance-id');
|
||||
|
||||
@@ -27,7 +27,6 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
|
||||
this.onlySafeWidthAndHeight();
|
||||
|
||||
this.initProgressListener();
|
||||
this.update();
|
||||
this.close(); // avoid caching
|
||||
this.tabBox.prepend(this.sidebarWrapper);
|
||||
this.listenForPrefChanges();
|
||||
@@ -557,16 +556,18 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
|
||||
_getWebPanelIcon(url, element) {
|
||||
let { preferredURI } = Services.uriFixup.getFixupURIInfo(url);
|
||||
element.setAttribute('image', `page-icon:${preferredURI.spec}`);
|
||||
fetch(`https://s2.googleusercontent.com/s2/favicons?domain_url=${preferredURI.spec}`).then(async (response) => {
|
||||
if (response.ok) {
|
||||
let blob = await response.blob();
|
||||
let reader = new FileReader();
|
||||
reader.onload = function () {
|
||||
element.setAttribute('image', reader.result);
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
}
|
||||
});
|
||||
if (Services.prefs.getBoolPref('zen.sidebar.use-google-favicons')) {
|
||||
fetch(`https://s2.googleusercontent.com/s2/favicons?domain_url=${preferredURI.spec}`).then(async (response) => {
|
||||
if (response.ok) {
|
||||
let blob = await response.blob();
|
||||
let reader = new FileReader();
|
||||
reader.onload = function () {
|
||||
element.setAttribute('image', reader.result);
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_getBrowserById(id) {
|
||||
|
||||
@@ -36,6 +36,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._resolveInitialized = resolve;
|
||||
});
|
||||
|
||||
promiseEmptyTabInitialized = new Promise((resolve) => {
|
||||
this._resolveEmptyTabInitialized = resolve;
|
||||
});
|
||||
|
||||
workspaceIndicatorXUL = `
|
||||
<hbox class="zen-current-workspace-indicator-icon"></hbox>
|
||||
<hbox class="zen-current-workspace-indicator-name"></hbox>
|
||||
@@ -145,6 +149,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
|
||||
_initializeEmptyTab() {
|
||||
if (Services.prefs.getBoolPref('zen.workspaces.disable_empty_state_for_testing', false)) {
|
||||
return;
|
||||
}
|
||||
this._emptyTab = gBrowser.addTrustedTab('about:blank', { inBackground: true, userContextId: 0, _forZenEmptyTab: true });
|
||||
}
|
||||
|
||||
@@ -603,16 +610,22 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
} catch (e) {
|
||||
console.error('ZenWorkspaces: Error initializing theme picker', e);
|
||||
}
|
||||
this._selectStartPage();
|
||||
await this._selectStartPage();
|
||||
this._fixTabPositions();
|
||||
this._resolveInitialized();
|
||||
this._clearAnyZombieTabs(); // Dont call with await
|
||||
}
|
||||
}
|
||||
|
||||
_selectStartPage() {
|
||||
async _selectStartPage() {
|
||||
if (Services.prefs.getBoolPref('zen.workspaces.disable_empty_state_for_testing', false)) {
|
||||
return;
|
||||
}
|
||||
const currentTab = gBrowser.selectedTab;
|
||||
let showed = false;
|
||||
await this.promiseEmptyTabInitialized;
|
||||
this._resolveEmptyTabInitialized = null;
|
||||
this.promiseEmptyTabInitialized = null;
|
||||
if (currentTab.pinned) {
|
||||
this.selectEmptyTab();
|
||||
try {
|
||||
|
||||
4
src/browser/base/zen-components/moz.build
Normal file
4
src/browser/base/zen-components/moz.build
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += [
|
||||
"tests/browser.toml",
|
||||
]
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af66b0495e 100644
|
||||
index fa96568d366fd3608f9bd583fa793150bd815c8b..89a3d8d63a045433f15fae37c8f5df2a84f01452 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -94,7 +94,7 @@
|
||||
@@ -11,15 +11,16 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -135,6 +135,7 @@
|
||||
@@ -135,6 +135,8 @@
|
||||
this.previewPanel = null;
|
||||
|
||||
this.allTabs[0].label = this.emptyTabTitle;
|
||||
+ this.allTabs[0]._possibleEmptyTab = true;
|
||||
+ ZenWorkspaces._resolveEmptyTabInitialized();
|
||||
|
||||
// Hide the secondary text for locales where it is unsupported due to size constraints.
|
||||
const language = Services.locale.appLocaleAsBCP47;
|
||||
@@ -339,7 +340,7 @@
|
||||
@@ -339,7 +341,7 @@
|
||||
// and we're not hitting the scroll buttons.
|
||||
if (
|
||||
event.button != 0 ||
|
||||
@@ -28,7 +29,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
event.composedTarget.localName == "toolbarbutton"
|
||||
) {
|
||||
return;
|
||||
@@ -388,6 +389,7 @@
|
||||
@@ -388,6 +390,7 @@
|
||||
// Reset the "ignored click" flag
|
||||
target._ignoredCloseButtonClicks = false;
|
||||
}
|
||||
@@ -36,7 +37,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
|
||||
/* Protects from close-tab-button errant doubleclick:
|
||||
@@ -683,7 +685,7 @@
|
||||
@@ -683,7 +686,7 @@
|
||||
if (this.#isContainerVerticalPinnedExpanded(tab)) {
|
||||
// In expanded vertical mode, the max number of pinned tabs per row is dynamic
|
||||
// Set this before adjusting dragged tab's position
|
||||
@@ -45,7 +46,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
let tabsPerRow = 0;
|
||||
let position = 0;
|
||||
for (let pinnedTab of pinnedTabs) {
|
||||
@@ -883,6 +885,10 @@
|
||||
@@ -883,6 +886,10 @@
|
||||
}
|
||||
|
||||
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||
@@ -56,7 +57,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
if (
|
||||
(effects == "move" || effects == "copy") &&
|
||||
this == draggedTab.container &&
|
||||
@@ -996,6 +1002,18 @@
|
||||
@@ -996,6 +1003,18 @@
|
||||
|
||||
this._tabDropIndicator.hidden = true;
|
||||
event.stopPropagation();
|
||||
@@ -75,7 +76,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
if (draggedTab && dropEffect == "copy") {
|
||||
// copy the dropped tab (wherever it's from)
|
||||
let newIndex = this._getDropIndex(event);
|
||||
@@ -1034,10 +1052,11 @@
|
||||
@@ -1034,10 +1053,11 @@
|
||||
}
|
||||
} else {
|
||||
let pinned = draggedTab.pinned;
|
||||
@@ -91,7 +92,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
);
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
@@ -1114,7 +1133,7 @@
|
||||
@@ -1114,7 +1134,7 @@
|
||||
let postTransitionCleanup = () => {
|
||||
tab.removeAttribute("tabdrop-samewindow");
|
||||
|
||||
@@ -100,7 +101,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
if (dropIndex !== false) {
|
||||
gBrowser.moveTabTo(tab, dropIndex);
|
||||
if (!directionForward) {
|
||||
@@ -1122,7 +1141,7 @@
|
||||
@@ -1122,7 +1142,7 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -109,7 +110,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -1249,7 +1268,7 @@
|
||||
@@ -1249,7 +1269,7 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -118,7 +119,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
gBrowser.loadTabs(urls, {
|
||||
inBackground,
|
||||
replace,
|
||||
@@ -1279,13 +1298,23 @@
|
||||
@@ -1279,13 +1299,23 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -144,7 +145,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
) {
|
||||
delete draggedTab._dragData;
|
||||
return;
|
||||
@@ -1517,7 +1546,7 @@
|
||||
@@ -1517,7 +1547,7 @@
|
||||
}
|
||||
|
||||
get newTabButton() {
|
||||
@@ -153,7 +154,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
|
||||
get verticalMode() {
|
||||
@@ -1537,28 +1566,40 @@
|
||||
@@ -1537,28 +1567,40 @@
|
||||
if (this.#allTabs) {
|
||||
return this.#allTabs;
|
||||
}
|
||||
@@ -202,7 +203,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
return children.filter(node => node.tagName == "tab-group");
|
||||
}
|
||||
|
||||
@@ -1579,7 +1620,7 @@
|
||||
@@ -1579,7 +1621,7 @@
|
||||
*/
|
||||
get visibleTabs() {
|
||||
if (!this.#visibleTabs) {
|
||||
@@ -211,7 +212,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
return this.#visibleTabs;
|
||||
}
|
||||
@@ -1613,10 +1654,8 @@
|
||||
@@ -1613,10 +1655,8 @@
|
||||
return this.#focusableItems;
|
||||
}
|
||||
|
||||
@@ -224,7 +225,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
|
||||
let focusableItems = [];
|
||||
for (let child of children) {
|
||||
@@ -1632,6 +1671,7 @@
|
||||
@@ -1632,6 +1672,7 @@
|
||||
}
|
||||
|
||||
this.#focusableItems = [
|
||||
@@ -232,7 +233,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
...verticalPinnedTabsContainer.children,
|
||||
...focusableItems,
|
||||
];
|
||||
@@ -1642,6 +1682,7 @@
|
||||
@@ -1642,6 +1683,7 @@
|
||||
_invalidateCachedTabs() {
|
||||
this.#allTabs = null;
|
||||
this._invalidateCachedVisibleTabs();
|
||||
@@ -240,7 +241,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
|
||||
_invalidateCachedVisibleTabs() {
|
||||
@@ -1656,8 +1697,8 @@
|
||||
@@ -1656,8 +1698,8 @@
|
||||
#isContainerVerticalPinnedExpanded(tab) {
|
||||
return (
|
||||
this.verticalMode &&
|
||||
@@ -251,7 +252,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1672,7 +1713,7 @@
|
||||
@@ -1672,7 +1714,7 @@
|
||||
|
||||
if (node == null) {
|
||||
// We have a container for non-tab elements at the end of the scrollbox.
|
||||
@@ -260,7 +261,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
|
||||
node.before(tab);
|
||||
@@ -1772,7 +1813,7 @@
|
||||
@@ -1772,7 +1814,7 @@
|
||||
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
|
||||
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
|
||||
// Attach the long click popup to all of them.
|
||||
@@ -269,7 +270,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
const newTab2 = this.newTabButton;
|
||||
const newTabVertical = document.getElementById(
|
||||
"vertical-tabs-newtab-button"
|
||||
@@ -1855,7 +1896,7 @@
|
||||
@@ -1855,7 +1897,7 @@
|
||||
let rect = ele => {
|
||||
return window.windowUtils.getBoundsWithoutFlushing(ele);
|
||||
};
|
||||
@@ -278,7 +279,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
if (tab && rect(tab).width <= this._tabClipWidth) {
|
||||
this.setAttribute("closebuttons", "activetab");
|
||||
} else {
|
||||
@@ -1867,10 +1908,12 @@
|
||||
@@ -1867,10 +1909,12 @@
|
||||
|
||||
_handleTabSelect(aInstant) {
|
||||
let selectedTab = this.selectedItem;
|
||||
@@ -291,7 +292,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -1882,7 +1925,7 @@
|
||||
@@ -1882,7 +1926,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -300,7 +301,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
if (!tabs.length) {
|
||||
return;
|
||||
}
|
||||
@@ -1918,7 +1961,7 @@
|
||||
@@ -1918,7 +1962,7 @@
|
||||
if (isEndTab && !this._hasTabTempMaxWidth) {
|
||||
return;
|
||||
}
|
||||
@@ -309,7 +310,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
// 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.
|
||||
@@ -1933,7 +1976,7 @@
|
||||
@@ -1933,7 +1977,7 @@
|
||||
let tabsToReset = [];
|
||||
for (let i = numPinned; i < tabs.length; i++) {
|
||||
let tab = tabs[i];
|
||||
@@ -318,7 +319,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
if (!isEndTab) {
|
||||
// keep tabs the same width
|
||||
tab.style.transition = "none";
|
||||
@@ -1999,16 +2042,15 @@
|
||||
@@ -1999,16 +2043,15 @@
|
||||
// Move pinned tabs to another container when the tabstrip is toggled to vertical
|
||||
// and when session restore code calls _positionPinnedTabs; update styling whenever
|
||||
// the number of pinned tabs changes.
|
||||
@@ -341,7 +342,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2016,9 +2058,7 @@
|
||||
@@ -2016,9 +2059,7 @@
|
||||
}
|
||||
|
||||
_resetVerticalPinnedTabs() {
|
||||
@@ -352,7 +353,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
|
||||
if (!verticalTabsContainer.children.length) {
|
||||
return;
|
||||
@@ -2031,8 +2071,8 @@
|
||||
@@ -2031,8 +2072,8 @@
|
||||
}
|
||||
|
||||
_positionPinnedTabs() {
|
||||
@@ -363,7 +364,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
let absPositionHorizontalTabs =
|
||||
this.overflowing && tabs.length > numPinned && numPinned > 0;
|
||||
|
||||
@@ -2041,7 +2081,7 @@
|
||||
@@ -2041,7 +2082,7 @@
|
||||
|
||||
if (this.verticalMode) {
|
||||
this._updateVerticalPinnedTabs();
|
||||
@@ -372,7 +373,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
let layoutData = this._pinnedTabsLayoutCache;
|
||||
let uiDensity = document.documentElement.getAttribute("uidensity");
|
||||
if (!layoutData || layoutData.uiDensity != uiDensity) {
|
||||
@@ -2113,7 +2153,7 @@
|
||||
@@ -2113,7 +2154,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -381,7 +382,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -2121,7 +2161,7 @@
|
||||
@@ -2121,7 +2162,7 @@
|
||||
dragData.animLastScreenX = screenX;
|
||||
|
||||
let { width: tabWidth, height: tabHeight } =
|
||||
@@ -390,7 +391,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
let shiftSizeX = tabWidth * movingTabs.length;
|
||||
let shiftSizeY = tabHeight;
|
||||
dragData.tabWidth = tabWidth;
|
||||
@@ -2296,10 +2336,11 @@
|
||||
@@ -2296,10 +2337,11 @@
|
||||
}
|
||||
|
||||
let pinned = draggedTab.pinned;
|
||||
@@ -406,7 +407,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
);
|
||||
|
||||
if (this.#rtlMode) {
|
||||
@@ -2348,7 +2389,11 @@
|
||||
@@ -2348,7 +2390,11 @@
|
||||
translate = Math.min(Math.max(translate, firstBound), lastBound);
|
||||
|
||||
for (let tab of movingTabs) {
|
||||
@@ -419,7 +420,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
|
||||
dragData.translatePos = translate;
|
||||
@@ -2484,12 +2529,16 @@
|
||||
@@ -2484,12 +2530,16 @@
|
||||
// Shift background tabs to leave a gap where the dragged tab
|
||||
// would currently be dropped.
|
||||
for (let tab of tabs) {
|
||||
@@ -437,7 +438,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
if (tab.group?.tabs[0] == tab) {
|
||||
tab.group.style.setProperty(
|
||||
"--tabgroup-dragover-transform",
|
||||
@@ -2541,8 +2590,9 @@
|
||||
@@ -2541,8 +2591,9 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -449,7 +450,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2553,6 +2603,7 @@
|
||||
@@ -2553,6 +2604,7 @@
|
||||
tab.style.transform = "";
|
||||
if (tab.group) {
|
||||
tab.group.style.removeProperty("--tabgroup-dragover-transform");
|
||||
@@ -457,7 +458,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
tab.removeAttribute("dragover-createGroup");
|
||||
}
|
||||
@@ -2604,7 +2655,7 @@
|
||||
@@ -2604,7 +2656,7 @@
|
||||
movingTab._moveTogetherSelectedTabsData.newIndex = movingTabNewIndex;
|
||||
movingTab._moveTogetherSelectedTabsData.animate = false;
|
||||
};
|
||||
@@ -466,7 +467,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -2707,9 +2758,9 @@
|
||||
@@ -2707,9 +2759,9 @@
|
||||
function newIndex(aTab, index) {
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
@@ -478,7 +479,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..a13d501f2f0f190b9dc8fe0ce4f1d7af
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2793,7 +2844,7 @@
|
||||
@@ -2793,7 +2845,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
|
||||
16
src/testing/profiles/mochitest/user-js.patch
Normal file
16
src/testing/profiles/mochitest/user-js.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/testing/profiles/mochitest/user.js b/testing/profiles/mochitest/user.js
|
||||
index a4068ac3f61161d014c49d54ae7a3bf886868f1b..84523e9e10d44269172aa6913699ec50def8166e 100644
|
||||
--- a/testing/profiles/mochitest/user.js
|
||||
+++ b/testing/profiles/mochitest/user.js
|
||||
@@ -41,3 +41,11 @@ user_pref("places.history.floodingPrevention.enabled", false);
|
||||
// permission, and we can open it and wait for the user to give permission, then
|
||||
// don't do that.
|
||||
user_pref("geo.prompt.open_system_prefs", false);
|
||||
+
|
||||
+user_pref("zen.keyboard.shortcuts.enabled", false);
|
||||
+user_pref("zen.welcome-screen.seen", true);
|
||||
+user_pref("zen.tab-unloader.enabled", false);
|
||||
+user_pref("zen.workspaces.disable_empty_state_for_testing", true);
|
||||
+user_pref("zen.watermark.enabled", false);
|
||||
+user_pref("zen.urlbar.replace-newtab", false);
|
||||
+user_pref("zen.sidebar.use-google-favicons", false); // Crashes on some platforms
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/testing/profiles/profileserver/user.js b/testing/profiles/profileserver/user.js
|
||||
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..40d1906bdebd08510014fd6124be17052248e748 100644
|
||||
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..a1ed4b51f26f458f965fbc29dfa7b8ad451faf7f 100644
|
||||
--- a/testing/profiles/profileserver/user.js
|
||||
+++ b/testing/profiles/profileserver/user.js
|
||||
@@ -8,3 +8,11 @@
|
||||
@@ -8,3 +8,12 @@
|
||||
user_pref("dom.timeout.enable_budget_timer_throttling", false);
|
||||
// Turn off update
|
||||
user_pref("app.update.disabledForTesting", true);
|
||||
@@ -10,7 +10,8 @@ index 19ff7d474f6d22d2d386764e2e6942ce6a324470..40d1906bdebd08510014fd6124be1705
|
||||
+// zen:
|
||||
+// Disable some of zen's features to better match the default Firefox experience
|
||||
+user_pref("zen.workspaces.disabled_for_testing", true);
|
||||
+user_pref("zen.welcome-screen.enabled", false);
|
||||
+user_pref("zen.workspaces.disable_empty_state_for_testing", true);
|
||||
+user_pref("zen.welcome-screen.seen", true);
|
||||
+user_pref("zen.tab-unloader.enabled", false);
|
||||
+user_pref("zen.watermark.enabled", false);
|
||||
+user_pref("zen.glance.enabled", false);
|
||||
|
||||
Reference in New Issue
Block a user