mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-31 12:51:59 +00:00
feat: Fix bootstraping and other small nitpicks, b=no-bug, c=common, tabs, workspaces
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
- name: zen.theme.accent-color
|
||||
value: '#ffb787'
|
||||
value: 'AccentColor'
|
||||
|
||||
- name: zen.theme.content-element-separation
|
||||
value: 8
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js
|
||||
index 8e63654b343e8518aa0e366a3fd3bf7e0856eafb..fe402e526ab33cdcc4baabf8685dfb03efac6003 100644
|
||||
index 8e63654b343e8518aa0e366a3fd3bf7e0856eafb..3cebc9bb057f51cea639130fecd7576e1c9db79c 100644
|
||||
--- a/browser/base/content/browser-init.js
|
||||
+++ b/browser/base/content/browser-init.js
|
||||
@@ -198,6 +198,7 @@ var gBrowserInit = {
|
||||
@@ -10,3 +10,11 @@ index 8e63654b343e8518aa0e366a3fd3bf7e0856eafb..fe402e526ab33cdcc4baabf8685dfb03
|
||||
gBrowser.addEventListener("DOMUpdateBlockedPopups", e =>
|
||||
PopupAndRedirectBlockerObserver.handleEvent(e)
|
||||
);
|
||||
@@ -372,6 +373,7 @@ var gBrowserInit = {
|
||||
|
||||
this._handleURIToLoad();
|
||||
|
||||
+ gZenWorkspaces.selectStartPage();
|
||||
Services.obs.addObserver(gIdentityHandler, "perm-changed");
|
||||
Services.obs.addObserver(gRemoteControl, "devtools-socket");
|
||||
Services.obs.addObserver(gRemoteControl, "marionette-listening");
|
||||
|
||||
@@ -61,39 +61,6 @@ diff --git a/mfbt/tests/TestUniquePtr.cpp b/mfbt/tests/TestUniquePtr.cpp
|
||||
CHECK(DeleteIntFunctionCallCount == 1);
|
||||
}
|
||||
|
||||
diff --git a/taskcluster/scripts/misc/build-clang.sh b/taskcluster/scripts/misc/build-clang.sh
|
||||
--- a/taskcluster/scripts/misc/build-clang.sh
|
||||
+++ b/taskcluster/scripts/misc/build-clang.sh
|
||||
@@ -23,11 +23,11 @@
|
||||
mkdir -p $ORIGPWD/bin
|
||||
echo "#!/bin/sh" > $ORIGPWD/bin/sw_vers
|
||||
echo echo 10.12 >> $ORIGPWD/bin/sw_vers
|
||||
chmod +x $ORIGPWD/bin/sw_vers
|
||||
# these variables are used in build-clang.py
|
||||
- export OSX_SYSROOT=$(ls -d $MOZ_FETCHES_DIR/MacOSX1*.sdk)
|
||||
+ export OSX_SYSROOT=$(ls -d $MOZ_FETCHES_DIR/MacOSX*.sdk)
|
||||
export PATH=$PATH:$ORIGPWD/bin
|
||||
;;
|
||||
*win64*)
|
||||
case "$(uname -s)" in
|
||||
MINGW*|MSYS*)
|
||||
diff --git a/taskcluster/scripts/misc/wr-macos-cross-build-setup.sh b/taskcluster/scripts/misc/wr-macos-cross-build-setup.sh
|
||||
--- a/taskcluster/scripts/misc/wr-macos-cross-build-setup.sh
|
||||
+++ b/taskcluster/scripts/misc/wr-macos-cross-build-setup.sh
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -x -e -v
|
||||
|
||||
export TARGET_TRIPLE="x86_64-apple-darwin"
|
||||
|
||||
-MACOS_SYSROOT=$(ls -d $MOZ_FETCHES_DIR/MacOSX1*.sdk)
|
||||
+MACOS_SYSROOT=$(ls -d $MOZ_FETCHES_DIR/MacOSX*.sdk)
|
||||
CLANGDIR="${MOZ_FETCHES_DIR}/clang"
|
||||
|
||||
# Deploy the wrench dependencies
|
||||
mv ${MOZ_FETCHES_DIR}/wrench-deps/{vendor,.cargo} "${GECKO_PATH}/gfx/wr/"
|
||||
|
||||
|
||||
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
|
||||
--- a/build/moz.configure/toolchain.configure
|
||||
+++ b/build/moz.configure/toolchain.configure
|
||||
@@ -110,53 +77,6 @@ diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolc
|
||||
"--with-macos-sdk",
|
||||
host,
|
||||
bootstrap_path(
|
||||
diff --git a/python/mozbuild/mozbuild/test/configure/macos_fake_sdk/SDKSettings.plist b/python/mozbuild/mozbuild/test/configure/macos_fake_sdk/SDKSettings.plist
|
||||
--- a/python/mozbuild/mozbuild/test/configure/macos_fake_sdk/SDKSettings.plist
|
||||
+++ b/python/mozbuild/mozbuild/test/configure/macos_fake_sdk/SDKSettings.plist
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Version</key>
|
||||
- <string>15.5</string>
|
||||
+ <string>26.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
diff --git a/taskcluster/kinds/toolchain/macos-sdk.yml b/taskcluster/kinds/toolchain/macos-sdk.yml
|
||||
index 71f4de56367d8b68f78c974f36430e6e97dbe79f..aa1917d795f79d100c4e091437cb454807ac7583 100644
|
||||
--- a/taskcluster/kinds/toolchain/macos-sdk.yml
|
||||
+++ b/taskcluster/kinds/toolchain/macos-sdk.yml
|
||||
@@ -46,19 +46,20 @@ macosx64-sdk-15.4:
|
||||
- macosx64-sdk-toolchain
|
||||
- MacOSX15.4.sdk
|
||||
|
||||
-macosx64-sdk-15.5:
|
||||
- description: "MacOSX15.5 SDK"
|
||||
+macosx64-sdk-26.0:
|
||||
+ description: "macOS 26.0 SDK"
|
||||
treeherder:
|
||||
- symbol: TM(sdk15.5)
|
||||
+ symbol: TM(sdk26.0)
|
||||
run:
|
||||
arguments:
|
||||
- - https://swcdn.apple.com/content/downloads/52/01/082-41241-A_0747ZN8FHV/dectd075r63pppkkzsb75qk61s0lfee22j/CLTools_macOSNMOS_SDK.pkg
|
||||
- - fb7c555e823b830279394e52c7d439bd287a9d8b007883fa0595962a240d488b5613f8cc8d1cc9657909de9367417652564f3df66e238a47bbc87244f5205056
|
||||
- - Library/Developer/CommandLineTools/SDKs/MacOSX15.5.sdk
|
||||
- toolchain-artifact: project/gecko/mac-sdk/MacOSX15.5.sdk.tar.zst
|
||||
+ - https://swcdn.apple.com/content/downloads/27/62/093-35114-A_AAH24ZZQB5/yn87ru9qe9225m8hwq2ic3hjy5yc5vw7h9/CLTools_macOSNMOS_SDK.pkg
|
||||
+ - d3286bd6d4dff1b12f1d0dab4816719e605a1bfb76af84575deec37b25fc4462d4fc1258aa43b138a557c4f9304e06740441b101eb367a4b5bd77200b0708c71
|
||||
+ - Library/Developer/CommandLineTools/SDKs/MacOSX26.0.sdk
|
||||
+ toolchain-artifact: project/gecko/mac-sdk/MacOSX26.0.sdk.tar.zst
|
||||
toolchain-alias:
|
||||
- macosx64-sdk
|
||||
- - MacOSX15.5.sdk
|
||||
+ - macosx64-sdk-toolchain
|
||||
+ - MacOSX26.0.sdk
|
||||
|
||||
ios-sdk-18.4:
|
||||
description: "iPhoneOS18.4 SDK"
|
||||
|
||||
diff --git a/browser/themes/osx/places/organizer.css b/browser/themes/osx/places/organizer.css
|
||||
index 60e3d65d9ea5..730aa23aed6c 100644
|
||||
--- a/browser/themes/osx/places/organizer.css
|
||||
|
||||
@@ -74,7 +74,7 @@ class nsZenUIMigration {
|
||||
|
||||
_migrateV3() {
|
||||
if (Services.prefs.getStringPref('zen.theme.accent-color', '').startsWith('system')) {
|
||||
Services.prefs.setStringPref('zen.theme.accent-color', '#ffb787');
|
||||
Services.prefs.setStringPref('zen.theme.accent-color', 'AccentColor');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,11 +37,8 @@
|
||||
}
|
||||
|
||||
.zen-browser-generic-background {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
overflow: clip;
|
||||
@@ -112,17 +109,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
#zen-browser-background {
|
||||
/* This is conceptually a background, but putting this on a pseudo-element
|
||||
* avoids it from suppressing the chrome-content separator border, etc.
|
||||
*
|
||||
* See bugzilla's 1949528 and bug 1476281 (which would make this unnecessary). */
|
||||
@media (-moz-platform: macos) {
|
||||
-moz-default-appearance: -moz-sidebar;
|
||||
appearance: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Important: We set the color to `AccentColor` so we can
|
||||
* Compute the stylings and get the native accent color.
|
||||
* Please, do not remove this.
|
||||
*/
|
||||
color: AccentColor;
|
||||
}
|
||||
|
||||
#sidebar-box {
|
||||
/** Sidebar is already hidden in full screen mode */
|
||||
border: none;
|
||||
}
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
#zen-main-app-wrapper {
|
||||
appearance: -moz-sidebar !important;
|
||||
}
|
||||
}
|
||||
|
||||
:root:not([zen-single-toolbar='true']) #zen-appcontent-wrapper {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ panel[type='arrow']:not(#feature-callout) {
|
||||
--panel-shadow-margin: 0px !important;
|
||||
--panel-background: transparent !important;
|
||||
--panel-border-color: transparent;
|
||||
border: 0 !important;
|
||||
|
||||
&::part(content) {
|
||||
background-color: transparent !important;
|
||||
|
||||
@@ -170,7 +170,7 @@ body > #confetti {
|
||||
}
|
||||
}
|
||||
|
||||
.toolbarbutton-1 {
|
||||
.toolbarbutton-1:not(#tabs-newtab-button) {
|
||||
:root:is([zen-single-toolbar='true'], :not([zen-sidebar-expanded='true']))
|
||||
#zen-sidebar-top-buttons-customization-target
|
||||
&,
|
||||
|
||||
@@ -157,8 +157,6 @@
|
||||
--zen-toolbar-button-inner-padding: 6px;
|
||||
--toolbarbutton-outer-padding: 4px;
|
||||
|
||||
--toolbarbutton-inner-padding: 5px !important;
|
||||
|
||||
--toolbarbutton-hover-background: var(--zen-toolbar-element-bg-hover) !important;
|
||||
|
||||
/* Using a semitransparent background preserves the tinting from the backdrop.
|
||||
@@ -239,6 +237,9 @@
|
||||
@media (-moz-platform: linux) {
|
||||
--zen-native-content-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
}
|
||||
@media (-moz-mac-tahoe-theme) {
|
||||
--zen-native-content-radius: 14px;
|
||||
}
|
||||
--zen-native-inner-radius: var(
|
||||
--zen-webview-border-radius,
|
||||
/* Inner radius calculation:
|
||||
|
||||
@@ -1150,7 +1150,10 @@
|
||||
--zen-essential-bg-margin: 2px;
|
||||
|
||||
&::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.85), rgba(68, 64, 64, 0.85));
|
||||
background: light-dark(
|
||||
rgba(255, 255, 255, 0.85),
|
||||
color-mix(in srgb, var(--zen-primary-color), rgba(68, 64, 64, 0.85) 50%)
|
||||
);
|
||||
margin: var(--zen-essential-bg-margin);
|
||||
border-radius: calc(var(--border-radius-medium) - var(--zen-essential-bg-margin));
|
||||
position: absolute;
|
||||
|
||||
@@ -1513,8 +1513,16 @@
|
||||
}
|
||||
|
||||
getNativeAccentColor() {
|
||||
const accentColor = Services.prefs.getStringPref('zen.theme.accent-color');
|
||||
const rgb = this.hexToRgb(accentColor);
|
||||
let accentColor = Services.prefs.getStringPref('zen.theme.accent-color');
|
||||
let rgb;
|
||||
if (accentColor === 'AccentColor') {
|
||||
const rawRgb = window.getComputedStyle(document.getElementById('zen-browser-background'))[
|
||||
'color'
|
||||
];
|
||||
rgb = rawRgb.match(/\d+/g).map(Number);
|
||||
} else {
|
||||
rgb = this.hexToRgb(accentColor);
|
||||
}
|
||||
if (this.isDarkMode) {
|
||||
// If the theme is dark, we want to use a lighter color
|
||||
return this.blendColors(rgb, [0, 0, 0], 40);
|
||||
|
||||
@@ -950,8 +950,6 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
window.addEventListener('TabSelect', this.onLocationChange.bind(this));
|
||||
|
||||
window.addEventListener('TabBrowserInserted', this.onTabBrowserInserted.bind(this));
|
||||
|
||||
await this.selectStartPage();
|
||||
}
|
||||
|
||||
async selectStartPage() {
|
||||
|
||||
Reference in New Issue
Block a user