|
|
|
|
@@ -0,0 +1,452 @@
|
|
|
|
|
diff --git a/mfbt/tests/TestUniquePtr.cpp b/mfbt/tests/TestUniquePtr.cpp
|
|
|
|
|
--- a/mfbt/tests/TestUniquePtr.cpp
|
|
|
|
|
+++ b/mfbt/tests/TestUniquePtr.cpp
|
|
|
|
|
@@ -314,43 +314,45 @@
|
|
|
|
|
gADestructorCalls = 0;
|
|
|
|
|
gBDestructorCalls = 0;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-typedef void (&FreeSignature)(void*);
|
|
|
|
|
+struct Free {
|
|
|
|
|
+ void operator()(void* aPtr) { free(aPtr); }
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
|
|
static size_t DeleteIntFunctionCallCount = 0;
|
|
|
|
|
+struct DeleteIntFunction {
|
|
|
|
|
+ void operator()(void* aPtr) {
|
|
|
|
|
+ DeleteIntFunctionCallCount++;
|
|
|
|
|
+ delete[] static_cast<int*>(aPtr);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
|
|
-static void DeleteIntFunction(void* aPtr) {
|
|
|
|
|
- DeleteIntFunctionCallCount++;
|
|
|
|
|
- delete[] static_cast<int*>(aPtr);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-static void SetMallocedInt(UniquePtr<int, FreeSignature>& aPtr, int aI) {
|
|
|
|
|
+static void SetMallocedInt(UniquePtr<int, Free>& aPtr, int aI) {
|
|
|
|
|
int* newPtr = static_cast<int*>(malloc(sizeof(int)));
|
|
|
|
|
*newPtr = aI;
|
|
|
|
|
aPtr.reset(newPtr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-static UniquePtr<int, FreeSignature> MallocedInt(int aI) {
|
|
|
|
|
- UniquePtr<int, FreeSignature> ptr(static_cast<int*>(malloc(sizeof(int))),
|
|
|
|
|
- free);
|
|
|
|
|
+static UniquePtr<int, Free> MallocedInt(int aI) {
|
|
|
|
|
+ UniquePtr<int, Free> ptr(static_cast<int*>(malloc(sizeof(int))), Free{});
|
|
|
|
|
*ptr = aI;
|
|
|
|
|
return ptr;
|
|
|
|
|
}
|
|
|
|
|
static bool TestFunctionReferenceDeleter() {
|
|
|
|
|
// Look for allocator mismatches and leaks to verify these bits
|
|
|
|
|
- UniquePtr<int, FreeSignature> i1(MallocedInt(17));
|
|
|
|
|
+ UniquePtr<int, Free> i1(MallocedInt(17));
|
|
|
|
|
CHECK(*i1 == 17);
|
|
|
|
|
|
|
|
|
|
SetMallocedInt(i1, 42);
|
|
|
|
|
CHECK(*i1 == 42);
|
|
|
|
|
|
|
|
|
|
// These bits use a custom deleter so we can instrument deletion.
|
|
|
|
|
{
|
|
|
|
|
- UniquePtr<int, FreeSignature> i2 =
|
|
|
|
|
- UniquePtr<int, FreeSignature>(new int[42], DeleteIntFunction);
|
|
|
|
|
+ UniquePtr<int, DeleteIntFunction> i2 =
|
|
|
|
|
+ UniquePtr<int, DeleteIntFunction>(new int[42], DeleteIntFunction{});
|
|
|
|
|
CHECK(DeleteIntFunctionCallCount == 0);
|
|
|
|
|
|
|
|
|
|
i2.reset(new int[76]);
|
|
|
|
|
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
|
|
|
|
|
@@ -231,11 +231,11 @@
|
|
|
|
|
nargs=1,
|
|
|
|
|
help="Location of platform SDK to use",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
def mac_sdk_min_version():
|
|
|
|
|
- return "15.5"
|
|
|
|
|
+ return "26.0"
|
|
|
|
|
|
|
|
|
|
@depends(
|
|
|
|
|
"--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
|
|
|
|
|
+++ b/browser/themes/osx/places/organizer.css
|
|
|
|
|
@@ -11,13 +11,15 @@
|
|
|
|
|
padding: 4px 4px 3px;
|
|
|
|
|
border-bottom: 1px solid ThreeDShadow;
|
|
|
|
|
|
|
|
|
|
- &::after {
|
|
|
|
|
- content: "";
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- inset: 0;
|
|
|
|
|
- appearance: auto;
|
|
|
|
|
- -moz-default-appearance: -moz-window-titlebar;
|
|
|
|
|
- z-index: -1;
|
|
|
|
|
+ @media not (-moz-mac-tahoe-theme) {
|
|
|
|
|
+ &::after {
|
|
|
|
|
+ content: "";
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ inset: 0;
|
|
|
|
|
+ appearance: auto;
|
|
|
|
|
+ -moz-default-appearance: -moz-window-titlebar;
|
|
|
|
|
+ z-index: -1;
|
|
|
|
|
+ }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
diff --git a/browser/themes/shared/pageInfo.css b/browser/themes/shared/pageInfo.css
|
|
|
|
|
index 92259765b92f..e7bf5a299abe 100644
|
|
|
|
|
--- a/browser/themes/shared/pageInfo.css
|
|
|
|
|
+++ b/browser/themes/shared/pageInfo.css
|
|
|
|
|
@@ -14,13 +14,15 @@
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
- &::after {
|
|
|
|
|
- content: "";
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- inset: 0;
|
|
|
|
|
- appearance: auto;
|
|
|
|
|
- -moz-default-appearance: -moz-window-titlebar;
|
|
|
|
|
- z-index: -1;
|
|
|
|
|
+ @media not (-moz-mac-tahoe-theme) {
|
|
|
|
|
+ &::after {
|
|
|
|
|
+ content: "";
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ inset: 0;
|
|
|
|
|
+ appearance: auto;
|
|
|
|
|
+ -moz-default-appearance: -moz-window-titlebar;
|
|
|
|
|
+ z-index: -1;
|
|
|
|
|
+ }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
diff --git a/layout/style/test/chrome/chrome-only-media-queries.js b/layout/style/test/chrome/chrome-only-media-queries.js
|
|
|
|
|
index e200152ba41b..88ba56525e99 100644
|
|
|
|
|
--- a/layout/style/test/chrome/chrome-only-media-queries.js
|
|
|
|
|
+++ b/layout/style/test/chrome/chrome-only-media-queries.js
|
|
|
|
|
@@ -4,6 +4,7 @@ const CHROME_ONLY_TOGGLES = [
|
|
|
|
|
"-moz-print-preview",
|
|
|
|
|
"-moz-overlay-scrollbars",
|
|
|
|
|
"-moz-mac-big-sur-theme",
|
|
|
|
|
+ "-moz-mac-tahoe-theme",
|
|
|
|
|
"-moz-menubar-drag",
|
|
|
|
|
"-moz-windows-accent-color-in-titlebar",
|
|
|
|
|
"-moz-swipe-animation-enabled",
|
|
|
|
|
diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs
|
|
|
|
|
index b0082951254a..ddbcd495260b 100644
|
|
|
|
|
--- a/servo/components/style/gecko/media_features.rs
|
|
|
|
|
+++ b/servo/components/style/gecko/media_features.rs
|
|
|
|
|
@@ -645,7 +645,7 @@ macro_rules! lnf_int_feature {
|
|
|
|
|
/// to support new types in these entries and (2) ensuring that either
|
|
|
|
|
/// nsPresContext::MediaFeatureValuesChanged is called when the value that
|
|
|
|
|
/// would be returned by the evaluator function could change.
|
|
|
|
|
-pub static MEDIA_FEATURES: [QueryFeatureDescription; 58] = [
|
|
|
|
|
+pub static MEDIA_FEATURES: [QueryFeatureDescription; 59] = [
|
|
|
|
|
feature!(
|
|
|
|
|
atom!("width"),
|
|
|
|
|
AllowsRanges::Yes,
|
|
|
|
|
@@ -918,6 +918,7 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 58] = [
|
|
|
|
|
),
|
|
|
|
|
lnf_int_feature!(atom!("-moz-menubar-drag"), MenuBarDrag),
|
|
|
|
|
lnf_int_feature!(atom!("-moz-mac-big-sur-theme"), MacBigSurTheme),
|
|
|
|
|
+ lnf_int_feature!(atom!("-moz-mac-tahoe-theme"), MacTahoeTheme),
|
|
|
|
|
feature!(
|
|
|
|
|
atom!("-moz-mac-rtl"),
|
|
|
|
|
AllowsRanges::No,
|
|
|
|
|
diff --git a/toolkit/themes/shared/menu.css b/toolkit/themes/shared/menu.css
|
|
|
|
|
index f1330e7dd7a3..23c04a931ae0 100644
|
|
|
|
|
--- a/toolkit/themes/shared/menu.css
|
|
|
|
|
+++ b/toolkit/themes/shared/menu.css
|
|
|
|
|
@@ -31,6 +31,11 @@ panel {
|
|
|
|
|
}
|
|
|
|
|
@media (-moz-platform: macos) {
|
|
|
|
|
--menuitem-padding: 3px 9px;
|
|
|
|
|
+
|
|
|
|
|
+ @media (-moz-mac-tahoe-theme) {
|
|
|
|
|
+ --menuitem-padding: 4px 11px;
|
|
|
|
|
+ --menuitem-border-radius: 7px;
|
|
|
|
|
+ }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (-moz-platform: windows) {
|
|
|
|
|
diff --git a/widget/LookAndFeel.h b/widget/LookAndFeel.h
|
|
|
|
|
index fc1e28206ac2..1661476a75f0 100644
|
|
|
|
|
--- a/widget/LookAndFeel.h
|
|
|
|
|
+++ b/widget/LookAndFeel.h
|
|
|
|
|
@@ -117,6 +117,12 @@ class LookAndFeel {
|
|
|
|
|
*/
|
|
|
|
|
MacBigSurTheme,
|
|
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ * A Boolean value to determine whether the macOS Tahoe-specific
|
|
|
|
|
+ * theming should be used.
|
|
|
|
|
+ */
|
|
|
|
|
+ MacTahoeTheme,
|
|
|
|
|
+
|
|
|
|
|
/*
|
|
|
|
|
* AlertNotificationOrigin indicates from which corner of the
|
|
|
|
|
* screen alerts slide in, and from which direction (horizontal/vertical).
|
|
|
|
|
diff --git a/widget/cocoa/nsCocoaFeatures.h b/widget/cocoa/nsCocoaFeatures.h
|
|
|
|
|
index dfad59dfe676..1a2389fda02c 100644
|
|
|
|
|
--- a/widget/cocoa/nsCocoaFeatures.h
|
|
|
|
|
+++ b/widget/cocoa/nsCocoaFeatures.h
|
|
|
|
|
@@ -22,6 +22,7 @@ class nsCocoaFeatures {
|
|
|
|
|
static bool OnMontereyOrLater();
|
|
|
|
|
static bool OnVenturaOrLater();
|
|
|
|
|
static bool OnSonomaOrLater();
|
|
|
|
|
+ static bool OnTahoeOrLater();
|
|
|
|
|
|
|
|
|
|
static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor,
|
|
|
|
|
int32_t aBugFix = 0);
|
|
|
|
|
diff --git a/widget/cocoa/nsCocoaFeatures.mm b/widget/cocoa/nsCocoaFeatures.mm
|
|
|
|
|
index 509bdbd3fbe3..b70b9c6bbed3 100644
|
|
|
|
|
--- a/widget/cocoa/nsCocoaFeatures.mm
|
|
|
|
|
+++ b/widget/cocoa/nsCocoaFeatures.mm
|
|
|
|
|
@@ -27,6 +27,7 @@
|
|
|
|
|
#define MACOS_VERSION_12_0_HEX 0x000C0000
|
|
|
|
|
#define MACOS_VERSION_13_0_HEX 0x000D0000
|
|
|
|
|
#define MACOS_VERSION_14_0_HEX 0x000E0000
|
|
|
|
|
+#define MACOS_VERSION_26_0_HEX 0x001A0000
|
|
|
|
|
|
|
|
|
|
#include "nsCocoaFeatures.h"
|
|
|
|
|
#include "nsCocoaUtils.h"
|
|
|
|
|
@@ -186,6 +187,11 @@ static int intAtStringIndex(NSArray* array, int index) {
|
|
|
|
|
return (macOSVersion() >= MACOS_VERSION_14_0_HEX);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+/* static */ bool nsCocoaFeatures::OnTahoeOrLater() {
|
|
|
|
|
+ // See comments above regarding SYSTEM_VERSION_COMPAT.
|
|
|
|
|
+ return (macOSVersion() >= MACOS_VERSION_26_0_HEX);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
/* static */ bool nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor,
|
|
|
|
|
int32_t aMinor,
|
|
|
|
|
int32_t aBugFix) {
|
|
|
|
|
diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h
|
|
|
|
|
index 38aca9f32590..9484ef078900 100644
|
|
|
|
|
--- a/widget/cocoa/nsCocoaWindow.h
|
|
|
|
|
+++ b/widget/cocoa/nsCocoaWindow.h
|
|
|
|
|
@@ -111,6 +111,9 @@ class TextInputHandler;
|
|
|
|
|
- (void)setEffectViewWrapperForStyle:(mozilla::WindowShadow)aStyle;
|
|
|
|
|
@property(nonatomic) mozilla::WindowShadow shadowStyle;
|
|
|
|
|
|
|
|
|
|
+- (void)updateTitlebarTransparency;
|
|
|
|
|
+- (void)setTitlebarSeparatorStyle:(NSTitlebarSeparatorStyle)aStyle API_AVAILABLE(macos(11.0));
|
|
|
|
|
+
|
|
|
|
|
- (void)releaseJSObjects;
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
|
|
|
|
|
index c9991df86dc6..c746a78b8440 100644
|
|
|
|
|
--- a/widget/cocoa/nsCocoaWindow.mm
|
|
|
|
|
+++ b/widget/cocoa/nsCocoaWindow.mm
|
|
|
|
|
@@ -7611,6 +7611,15 @@ - (id)initWithContentRect:(NSRect)aContentRect
|
|
|
|
|
// vibrancy effect and window border.
|
|
|
|
|
- (void)setEffectViewWrapperForStyle:(WindowShadow)aStyle {
|
|
|
|
|
NSView* wrapper = [&]() -> NSView* {
|
|
|
|
|
+ if (@available(macOS 26.0, *)) {
|
|
|
|
|
+ if (aStyle == WindowShadow::Menu) {
|
|
|
|
|
+ // Menus on macOS 26 use glass instead of vibrancy.
|
|
|
|
|
+ auto* effectView =
|
|
|
|
|
+ [[NSGlassEffectView alloc] initWithFrame:self.contentView.frame];
|
|
|
|
|
+ effectView.cornerRadius = 12.0f;
|
|
|
|
|
+ return effectView;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
if (aStyle == WindowShadow::Menu || aStyle == WindowShadow::Tooltip) {
|
|
|
|
|
const bool isMenu = aStyle == WindowShadow::Menu;
|
|
|
|
|
auto* effectView =
|
|
|
|
|
@@ -7721,6 +7730,7 @@ - (void)setDrawsContentsIntoWindowFrame:(BOOL)aState {
|
|
|
|
|
mDrawsIntoWindowFrame = aState;
|
|
|
|
|
if (changed) {
|
|
|
|
|
[self reflowTitlebarElements];
|
|
|
|
|
+ [self updateTitlebarTransparency];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -7850,6 +7860,32 @@ - (void)reflowTitlebarElements {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+- (void)updateTitlebarTransparency {
|
|
|
|
|
+ if (self.drawsContentsIntoWindowFrame) {
|
|
|
|
|
+ // Hide the titlebar if we are drawing into it
|
|
|
|
|
+ self.titlebarAppearsTransparent = true;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (@available(macOS 26.0, *)) {
|
|
|
|
|
+ // On macOS 26, the titlebar must be transparent to hide the separator.
|
|
|
|
|
+ // This does not affect the titlebar background on macOS 26, as it
|
|
|
|
|
+ // already matches the window background even when not transparent.
|
|
|
|
|
+ if (self.titlebarSeparatorStyle == NSTitlebarSeparatorStyleNone) {
|
|
|
|
|
+ self.titlebarAppearsTransparent = true;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Show the titlebar otherwise.
|
|
|
|
|
+ self.titlebarAppearsTransparent = false;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+- (void)setTitlebarSeparatorStyle:(NSTitlebarSeparatorStyle)aStyle {
|
|
|
|
|
+ [super setTitlebarSeparatorStyle:aStyle];
|
|
|
|
|
+ [self updateTitlebarTransparency];
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
- (BOOL)respondsToSelector:(SEL)aSelector {
|
|
|
|
|
// Claim the window doesn't respond to this so that the system
|
|
|
|
|
// doesn't steal keyboard equivalents for it. Bug 613710.
|
|
|
|
|
@@ -8166,8 +8202,6 @@ - (void)setDrawsContentsIntoWindowFrame:(BOOL)aState {
|
|
|
|
|
BOOL stateChanged = self.drawsContentsIntoWindowFrame != aState;
|
|
|
|
|
[super setDrawsContentsIntoWindowFrame:aState];
|
|
|
|
|
if (stateChanged && [self.delegate isKindOfClass:[WindowDelegate class]]) {
|
|
|
|
|
- // Hide the titlebar if we are drawing into it
|
|
|
|
|
- self.titlebarAppearsTransparent = aState;
|
|
|
|
|
self.titleVisibility = aState ? NSWindowTitleHidden : NSWindowTitleVisible;
|
|
|
|
|
|
|
|
|
|
// Here we extend / shrink our mainChildView.
|
|
|
|
|
diff --git a/widget/cocoa/nsLookAndFeel.mm b/widget/cocoa/nsLookAndFeel.mm
|
|
|
|
|
index 16cf2ed9b0ea..579b2445adfe 100644
|
|
|
|
|
--- a/widget/cocoa/nsLookAndFeel.mm
|
|
|
|
|
+++ b/widget/cocoa/nsLookAndFeel.mm
|
|
|
|
|
@@ -458,6 +458,9 @@ static bool PrefersNonBlinkingTextInsertionIndicator() {
|
|
|
|
|
case IntID::MacBigSurTheme:
|
|
|
|
|
aResult = nsCocoaFeatures::OnBigSurOrLater();
|
|
|
|
|
break;
|
|
|
|
|
+ case IntID::MacTahoeTheme:
|
|
|
|
|
+ aResult = nsCocoaFeatures::OnTahoeOrLater();
|
|
|
|
|
+ break;
|
|
|
|
|
case IntID::AlertNotificationOrigin:
|
|
|
|
|
aResult = NS_ALERT_TOP;
|
|
|
|
|
break;
|
|
|
|
|
diff --git a/widget/cocoa/nsNativeThemeCocoa.mm b/widget/cocoa/nsNativeThemeCocoa.mm
|
|
|
|
|
index 6ddd495b73f9..b94b8331be87 100644
|
|
|
|
|
--- a/widget/cocoa/nsNativeThemeCocoa.mm
|
|
|
|
|
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
|
|
|
|
|
@@ -191,6 +191,10 @@ static NSControlSize ControlSizeForEnum(CocoaSize enumControlSize) {
|
|
|
|
|
|
|
|
|
|
static void InflateControlRect(NSRect* rect, NSControlSize cocoaControlSize,
|
|
|
|
|
const CellMarginArray& marginSet) {
|
|
|
|
|
+ if (nsCocoaFeatures::OnTahoeOrLater()) {
|
|
|
|
|
+ // Controls on macOS 26 fill the entire frame and do not require inflation.
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
auto controlSize = EnumSizeForCocoaSize(cocoaControlSize);
|
|
|
|
|
const IntMargin& buttonMargins = marginSet[controlSize];
|
|
|
|
|
rect->origin.x -= buttonMargins.left;
|
|
|
|
|
diff --git a/widget/nsXPLookAndFeel.cpp b/widget/nsXPLookAndFeel.cpp
|
|
|
|
|
index c0dde6e1c04a..24b6f83930a7 100644
|
|
|
|
|
--- a/widget/nsXPLookAndFeel.cpp
|
|
|
|
|
+++ b/widget/nsXPLookAndFeel.cpp
|
|
|
|
|
@@ -121,6 +121,7 @@ static const char sIntPrefs[][45] = {
|
|
|
|
|
"ui.windowsMica",
|
|
|
|
|
"ui.windowsMicaPopups",
|
|
|
|
|
"ui.macBigSurTheme",
|
|
|
|
|
+ "ui.macTahoeTheme",
|
|
|
|
|
"ui.alertNotificationOrigin",
|
|
|
|
|
"ui.scrollToClick",
|
|
|
|
|
"ui.IMERawInputUnderlineStyle",
|
|
|
|
|
diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py
|
|
|
|
|
index e1a0497dc0b9..ec88f0496378 100644
|
|
|
|
|
--- a/xpcom/ds/StaticAtoms.py
|
|
|
|
|
+++ b/xpcom/ds/StaticAtoms.py
|
|
|
|
|
@@ -2283,6 +2283,7 @@ STATIC_ATOMS = [
|
|
|
|
|
Atom("_moz_windows_mica", "-moz-windows-mica"),
|
|
|
|
|
Atom("_moz_windows_mica_popups", "-moz-windows-mica-popups"),
|
|
|
|
|
Atom("_moz_mac_big_sur_theme", "-moz-mac-big-sur-theme"),
|
|
|
|
|
+ Atom("_moz_mac_tahoe_theme", "-moz-mac-tahoe-theme"),
|
|
|
|
|
Atom("_moz_mac_rtl", "-moz-mac-rtl"),
|
|
|
|
|
Atom("_moz_mac_titlebar_height", "-moz-mac-titlebar-height"),
|
|
|
|
|
Atom("_moz_platform", "-moz-platform"),
|