mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-19 11:27:16 +00:00
69 lines
2.7 KiB
C++
69 lines
2.7 KiB
C++
diff --git a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
|
|
index 9f4aa535e07adab496788165f4089be6732b1444..7b7955c0d1f2f3277cb750652458649d181e90e5 100644
|
|
--- a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
|
|
+++ b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
|
|
@@ -39,6 +39,10 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|
300
|
|
);
|
|
|
|
+function zenSplitViewIsEnabled() {
|
|
+ return Services.prefs.getBoolPref("zen.splitView.working", false);
|
|
+}
|
|
+
|
|
/**
|
|
* The tab switcher is responsible for asynchronously switching
|
|
* tabs in e10s. It waits until the new tab is ready (i.e., the
|
|
@@ -279,7 +283,7 @@ export class AsyncTabSwitcher {
|
|
browser.docShellIsActive = true;
|
|
}
|
|
|
|
- if (remoteTab) {
|
|
+ if (remoteTab && !zenSplitViewIsEnabled()) {
|
|
browser.renderLayers = true;
|
|
remoteTab.priorityHint = true;
|
|
}
|
|
@@ -291,7 +295,7 @@ export class AsyncTabSwitcher {
|
|
// Setting the docShell to be inactive will also cause it
|
|
// to stop rendering layers.
|
|
browser.docShellIsActive = false;
|
|
- if (remoteTab) {
|
|
+ if (remoteTab && !zenSplitViewIsEnabled()) {
|
|
remoteTab.priorityHint = false;
|
|
}
|
|
if (!browser.hasLayers) {
|
|
@@ -364,7 +368,7 @@ export class AsyncTabSwitcher {
|
|
// constructing BrowserChild's, layer trees, etc, by showing a blank
|
|
// tab instead and focusing it immediately.
|
|
let shouldBeBlank = false;
|
|
- if (requestedBrowser.isRemoteBrowser) {
|
|
+ if (requestedBrowser.isRemoteBrowser && !zenSplitViewIsEnabled()) {
|
|
// If a tab is remote and the window is not minimized, we can show a
|
|
// blank tab instead of a spinner in the following cases:
|
|
//
|
|
@@ -399,7 +403,7 @@ export class AsyncTabSwitcher {
|
|
}
|
|
}
|
|
|
|
- if (requestedBrowser.isRemoteBrowser) {
|
|
+ if (requestedBrowser.isRemoteBrowser && !zenSplitViewIsEnabled()) {
|
|
this.addLogFlag("isRemote");
|
|
}
|
|
|
|
@@ -825,7 +829,7 @@ export class AsyncTabSwitcher {
|
|
`onRemotenessChange(${tab._tPos}, ${tab.linkedBrowser.isRemoteBrowser})`
|
|
);
|
|
if (!tab.linkedBrowser.isRemoteBrowser) {
|
|
- if (this.getTabState(tab) == this.STATE_LOADING) {
|
|
+ if (this.getTabState(tab) == this.STATE_LOADING && !zenSplitViewIsEnabled()) {
|
|
this.onLayersReady(tab.linkedBrowser);
|
|
} else if (this.getTabState(tab) == this.STATE_UNLOADING) {
|
|
this.onLayersCleared(tab.linkedBrowser);
|
|
@@ -1018,6 +1022,7 @@ export class AsyncTabSwitcher {
|
|
lazy.gTabCacheSize > 1 &&
|
|
tab.linkedBrowser.isRemoteBrowser &&
|
|
tab.linkedBrowser.currentURI.spec != "about:blank"
|
|
+ && !zenSplitViewIsEnabled()
|
|
) {
|
|
let tabIndex = this.tabLayerCache.indexOf(tab);
|
|
|