diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 602e397a..007d2eb7 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -177,7 +177,7 @@ jobs: if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} run: | cd engine/ - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81 + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.82 source $HOME/.cargo/env if test "${{ matrix.arch }}" = "aarch64"; then rustup target add aarch64-pc-windows-msvc diff --git a/configs/common/mozconfig b/configs/common/mozconfig index 00c55a04..8267b225 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -8,7 +8,6 @@ ac_add_options --with-l10n-base="${topsrcdir}/browser/locales" export MOZ_USER_DIR="${name}" export MOZ_APP_BASENAME=Zen -export MOZ_APP_PROFILE=${binName} export MOZ_BRANDING_DIRECTORY=${brandingDir} export MOZ_OFFICIAL_BRANDING_DIRECTORY=${brandingDir} diff --git a/src/browser/base/content/ZenUIManager.mjs b/src/browser/base/content/ZenUIManager.mjs index 08f48149..aa75b72e 100644 --- a/src/browser/base/content/ZenUIManager.mjs +++ b/src/browser/base/content/ZenUIManager.mjs @@ -65,7 +65,7 @@ var gZenUIManager = { tabs.style.removeProperty('flex'); tabs.style.maxHeight = height + 'px'; gZenVerticalTabsManager.actualWindowButtons.removeAttribute('zen-has-hover'); - gURLBar.updateLayoutBreakout(); + gURLBar.zenUpdateLayoutBreakout(); }, get tabsWrapper() { @@ -642,7 +642,10 @@ var gZenVerticalTabsManager = { if (!isSingleToolbar) { document.getElementById('urlbar').style.setProperty('--urlbar-height', '32px'); } else { - gURLBar.updateLayoutBreakout(); + try { + gURLBar.zenUpdateLayoutBreakout(); + } catch (e) { + } } // Always move the splitter next to the sidebar diff --git a/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch b/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch index f53668d7..14ccb820 100644 --- a/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch +++ b/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs -index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..6a68b53443d32461927ef98d770b297caaecf790 100644 +index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..20248e5c0e38d4de3349687157b6aeb40339488d 100644 --- a/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs @@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -95,7 +95,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..6a68b53443d32461927ef98d770b297c } } - -+ ZenCustomizableUI.init(window); ++ lazy.ZenCustomizableUI.init(aWindow); // Now register all the toolbars for (let area of CustomizableUI.areas) { let type = CustomizableUI.getAreaType(area); @@ -106,7 +106,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..6a68b53443d32461927ef98d770b297c } } - -+ ZenCustomizableUI.registerToolbarNodes(window); ++ lazy.ZenCustomizableUI.registerToolbarNodes(aWindow); // Handle initial state of vertical tabs. if (isVerticalTabs) { // Show the vertical tabs toolbar diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index 7ac2426a..c5019e88 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index 0dc763824f390b4964489ac4e071ed6d41cc41db..3e0be2c686a162038e99b31fdbcf9832f184a629 100644 +index 0dc763824f390b4964489ac4e071ed6d41cc41db..fd0756885990f9da34390603d13fd8851844e982 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -424,11 +424,50 @@ @@ -656,7 +656,7 @@ index 0dc763824f390b4964489ac4e071ed6d41cc41db..3e0be2c686a162038e99b31fdbcf9832 !this.contextTabs[0].group && (this.contextTabs[0] == visibleTabs[0] || - this.contextTabs[0] == visibleTabs[gBrowser.pinnedTabCount]); -+ this.contextTabs[0] == visibleTabs[gBrowser._numVisiblePinTabs]; ++ this.contextTabs[0] == visibleTabs[gBrowser._numVisiblePinTabs]); contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent; document.getElementById("context_openTabInWindow").disabled = diff --git a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch index ced98537..d5883a48 100644 --- a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch +++ b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs -index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b62e85eed4 100644 +index 6de4c2ac873b1424abee118a143ac377f26beb80..3b41d52c8e00860ce9913a334f15f70e1db08a7c 100644 --- a/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs @@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -16,7 +16,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 const DEFAULT_FORM_HISTORY_NAME = "searchbar-history"; const SEARCH_BUTTON_CLASS = "urlbar-search-button"; -@@ -349,7 +356,11 @@ 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; @@ -28,7 +28,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 this._suppressPrimaryAdjustment = false; } -@@ -425,6 +436,10 @@ export class UrlbarInput { +@@ -424,6 +435,10 @@ export class UrlbarInput { hideSearchTerms = false, isSameDocument = false ) { @@ -39,7 +39,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 // We only need to update the searchModeUI on tab switch conditionally // as we only persist searchMode with ScotchBonnet enabled. if ( -@@ -698,8 +713,11 @@ export class UrlbarInput { +@@ -697,8 +712,11 @@ export class UrlbarInput { return; } } @@ -52,7 +52,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 } /** -@@ -943,6 +961,10 @@ export class UrlbarInput { +@@ -937,6 +955,10 @@ export class UrlbarInput { // Nullify search mode before setURI so it won't try to restore it. this.searchMode = null; this.setURI(null, true, false, true); @@ -63,7 +63,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 if (this.value && this.focused) { this.select(); } -@@ -1098,7 +1120,11 @@ export class UrlbarInput { +@@ -1092,7 +1114,11 @@ export class UrlbarInput { } if (!this.#providesSearchMode(result)) { @@ -76,7 +76,18 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 } this.controller.recordSelectedResult(event, result); -@@ -2157,6 +2183,11 @@ export class UrlbarInput { +@@ -2124,6 +2150,10 @@ export class UrlbarInput { + await this.#updateLayoutBreakoutDimensions(); + } + ++ async zenUpdateLayoutBreakout() { ++ await this.#updateLayoutBreakout(); ++ } ++ + startLayoutExtend() { + if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) { + // Do not expand if the Urlbar does not support being expanded or it is +@@ -2146,6 +2176,11 @@ export class UrlbarInput { this.setAttribute("breakout-extend", "true"); @@ -88,7 +99,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 // 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")) { -@@ -2176,6 +2207,11 @@ export class UrlbarInput { +@@ -2165,6 +2200,11 @@ export class UrlbarInput { return; } @@ -100,7 +111,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 this.removeAttribute("breakout-extend"); this.#updateTextboxPosition(); } -@@ -2998,7 +3034,7 @@ export class UrlbarInput { +@@ -2997,7 +3037,7 @@ export class UrlbarInput { */ _trimValue(val) { let trimmedValue = lazy.UrlbarPrefs.get("trimURLs") @@ -109,7 +120,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 : val; // Only trim value if the directionality doesn't change to RTL and we're not // showing a strikeout https protocol. -@@ -3365,7 +3401,7 @@ export class UrlbarInput { +@@ -3359,7 +3399,7 @@ export class UrlbarInput { } else { where = lazy.BrowserUtils.whereToOpenLink(event, false, false); } @@ -118,7 +129,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 if (where == "current") { where = "tab"; } else if (where == "tab") { -@@ -3380,6 +3416,9 @@ export class UrlbarInput { +@@ -3374,6 +3414,9 @@ export class UrlbarInput { ) { where = "current"; } @@ -128,7 +139,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 return where; } -@@ -3921,6 +3960,11 @@ export class UrlbarInput { +@@ -4048,6 +4091,11 @@ export class UrlbarInput { } _on_click(event) { @@ -140,7 +151,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 if ( event.target == this.inputField || event.target == this._inputContainer || -@@ -3992,7 +4036,7 @@ export class UrlbarInput { +@@ -4119,7 +4167,7 @@ export class UrlbarInput { } } @@ -149,7 +160,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 this.view.autoOpen({ event }); } else { if (this._untrimOnFocusAfterKeydown) { -@@ -4032,9 +4076,12 @@ export class UrlbarInput { +@@ -4159,9 +4207,12 @@ export class UrlbarInput { } _on_mousedown(event) { @@ -163,7 +174,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6 if ( event.target != this.inputField && -@@ -4044,8 +4091,8 @@ export class UrlbarInput { +@@ -4171,8 +4222,8 @@ export class UrlbarInput { break; } diff --git a/src/build/moz-build.patch b/src/build/moz-build.patch index c6b981ea..46aee904 100644 --- a/src/build/moz-build.patch +++ b/src/build/moz-build.patch @@ -1,8 +1,8 @@ diff --git a/build/moz.build b/build/moz.build -index 7bf9c501db06d38f924c26372d4243d448af8d81..90b02a99af90c40cea7d90c20ce1bac3d8c109a8 100644 +index ad78395c33bba4f6a7bd73bae2a3b6e0658ed59e..a3ba1001a60b764c9ef1c824917fe4d5b81ed0b2 100644 --- a/build/moz.build +++ b/build/moz.build -@@ -91,7 +91,7 @@ if CONFIG["MOZ_APP_BASENAME"]: +@@ -90,7 +90,7 @@ if CONFIG["MOZ_APP_BASENAME"]: if CONFIG[var]: appini_defines[var] = True diff --git a/src/toolkit/moz-configure.patch b/src/toolkit/moz-configure.patch index f3cd4394..ffc5d8d4 100644 --- a/src/toolkit/moz-configure.patch +++ b/src/toolkit/moz-configure.patch @@ -1,8 +1,24 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure -index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b7dc639db 100644 +index e5e517635d639f43de064fdc81a33090c28ca786..67ce7a27d93c3c6f9c8045c2d5796b85bf059113 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure -@@ -81,10 +81,13 @@ option( +@@ -22,6 +22,7 @@ def check_moz_app_id(moz_app_id, build_project): + + project_flag( + env="MOZ_APP_VENDOR", ++ default="Zen Team", + nargs=1, + help='Used for application.ini\'s "Vendor" field, which also impacts profile location and user-visible fields', + ) +@@ -35,6 +36,7 @@ project_flag( + + project_flag( + "MOZ_APP_PROFILE", ++ default="zen", + nargs=1, + help='Used for application.ini\'s "Profile" field, which controls profile location', + ) +@@ -87,10 +89,13 @@ option( ) set_config("MOZ_INCLUDE_SOURCE_INFO", True, when="MOZ_INCLUDE_SOURCE_INFO") @@ -17,7 +33,7 @@ index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b help="Set distribution-specific id", ) set_config("MOZ_DISTRIBUTION_ID", depends("--with-distribution-id")(lambda v: v[0])) -@@ -869,9 +872,9 @@ set_define("MOZ_AV1", av1) +@@ -881,9 +886,9 @@ set_config("MOZ_SYSTEM_AV1", True, when="--with-system-av1") option("--disable-jxl", help="Disable jxl image support") @@ -30,7 +46,7 @@ index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b return True -@@ -2012,7 +2015,7 @@ set_define("A11Y_LOG", True, when=a11y_log) +@@ -2019,7 +2024,7 @@ set_define("A11Y_LOG", True, when=a11y_log) # ============================================================== @depends(milestone) def require_signing(milestone):