This commit is contained in:
Laura Hausmann 2023-10-28 01:17:24 +02:00
parent d5f695b0a9
commit b7ef92fc55
Signed by untrusted user: zotan
GPG key ID: D044E84C5BE01605
8 changed files with 160 additions and 1 deletions

View file

@ -4,6 +4,8 @@ FINAL_TARGET_FILES += [
FINAL_TARGET_FILES.distribution += [
"policies.json",
"userChrome.css",
"userContent.css",
]
# local-settings does not yet end up being pacakged.

View file

@ -1,6 +1,11 @@
// misc
pref("browser.newtabpage.enabled", false);
pref("browser.startup.homepage", "about:blank");
lockPref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
lockPref("browser.uidensity", 1);
// Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1420777
lockPref("network.http.http2.coalesce-hostnames", false);
// ads & annoyances
pref("extensions.getAddons.showPane", false);

102
assets/userChrome.css Normal file
View file

@ -0,0 +1,102 @@
/* General UI customizations */
:root {
--uc-toolbar-height: 35px;
}
:root:not([sizemode="fullscreen"]) {
--uc-window-control-width: 65px;
}
.titlebar-buttonbox,
#window-controls {
color: var(--toolbar-color);
}
:root[sizemode="fullscreen"] .titlebar-buttonbox-container {
display: none
}
:root[sizemode="fullscreen"] #navigator-toolbox {
position: relative;
}
:root[sizemode="fullscreen"] #TabsToolbar>.titlebar-buttonbox-container:last-child,
:root[sizemode="fullscreen"] #window-controls {
position: absolute;
display: flex;
top: 0;
right: 0;
height: 40px;
}
:root[sizemode="fullscreen"] #TabsToolbar>.titlebar-buttonbox-container:last-child,
:root[uidensity="compact"][sizemode="fullscreen"] #window-controls {
height: 32px
}
:root #nav-bar {
border-inline: 0 solid transparent;
border-inline-style: solid !important;
border-right-width: calc(var(--uc-window-control-width, 0px));
border-inline-width: var(--uc-window-control-width, 0px) 0px;
background-clip: border-box !important;
}
#TabsToolbar>* {
visibility: collapse !important
}
:root[sizemode="fullscreen"] #TabsToolbar>#window-controls {
visibility: visible !important;
z-index: 2
}
#TabsToolbar>.titlebar-buttonbox-container {
visibility: visible !important;
height: var(--uc-toolbar-height) !important;
}
#nav-bar {
margin-top: calc(0px - var(--uc-toolbar-height));
}
:root[inFullscreen] #navigator-toolbox {
margin-top: 15px
}
#sidebar-header {
display: none;
}
#sidebar-splitter {
--sidebar-border-color: var(--chrome-content-separator-color);
}
#navigator-toolbox {
--toolbarbutton-hover-background: hsla(0, 0%, 70%, 0.15);
}
#urlbar-background {
--toolbar-field-focus-border-color: #c44aa0; /* orig: #a86595 */
}
#tracking-protection-icon-container {
display: none;
}
/* Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1721612 */
@font-face {
font-family: system-ui;
src: local('SF Pro Display');
}
@font-face {
font-family: -apple-system;
src: local('SF Pro Display');
}
* {
font-family: system-ui;
}

9
assets/userContent.css Normal file
View file

@ -0,0 +1,9 @@
@font-face {
font-family: system-ui;
src: local('SF Pro Display');
}
@font-face {
font-family: -apple-system;
src: local('SF Pro Display');
}

View file

@ -9,7 +9,7 @@ git clean -fd
# Prepare assets
mkdir -p snowleopard
cp ../assets/mozconfig mozconfig
cp ../assets/{local-settings.js,prefs.js,policies.json,moz.build} snowleopard/
cp ../assets/{local-settings.js,prefs.js,policies.json,moz.build,userChrome.css,userContent.css} snowleopard/
# Prepare patches
for patch in ../patches/*.patch; do

View file

@ -0,0 +1,25 @@
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index dac063c8a17fc..4bdd21bca9588 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -455,16 +455,10 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
}
#endif // defined(MOZ_CONTENT_TEMP_DIR)
else if (!strcmp(aProperty, NS_APP_USER_CHROME_DIR)) {
- // It isn't clear why this uses GetProfileStartupDir instead of
- // GetProfileDir. It could theoretically matter in a non-main
- // process where some other directory provider has defined
- // NS_APP_USER_PROFILE_50_DIR. In that scenario, using
- // GetProfileStartupDir means this will fail instead of succeed.
- rv = GetProfileStartupDir(getter_AddRefs(file));
- if (NS_FAILED(rv)) {
- return rv;
- }
- rv = file->AppendNative("chrome"_ns);
+ bool persistent = false;
+ rv = GetFile(NS_GRE_DIR, &persistent, getter_AddRefs(file));
+ NS_ENSURE_SUCCESS(rv, rv);
+ rv = file->AppendNative("distribution"_ns);
} else if (!strcmp(aProperty, NS_APP_PREFS_50_DIR)) {
rv = GetProfileDir(getter_AddRefs(file));
if (NS_FAILED(rv)) {

View file

@ -0,0 +1,15 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index d748b93a92455..4183758ae427e 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -249,10 +249,7 @@ var CustomizableUIInternal = {
Services.policies.isAllowed("removeHomeButtonByDefault")
? null
: "home-button",
- "spring",
"urlbar-container",
- "spring",
- "save-to-pocket-button",
"downloads-button",
AppConstants.MOZ_DEV_EDITION ? "developer-button" : null,
"fxa-toolbar-menu-button",

View file

@ -2,4 +2,5 @@
set -e
cd ./mozilla-unified
#MOZ_LOG=nsHttp:5 ./mach run
./mach run