From b563e06527071bcd293d69aeb90514faa02157df Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Thu, 26 Feb 2026 13:52:19 +0100 Subject: [PATCH] chore: Import external patches, p=#12525 --- prefs/firefox/browser.yaml | 4 + .../content/zen-panels/folders-search.inc | 3 +- .../content/aboutwelcome-css.patch | 40 ++++++ .../firefox/native_macos_popovers.patch | 125 +++++++++--------- 4 files changed, 105 insertions(+), 67 deletions(-) create mode 100644 src/browser/components/aboutwelcome/content/aboutwelcome-css.patch diff --git a/prefs/firefox/browser.yaml b/prefs/firefox/browser.yaml index 43805e5bb..1570f2eba 100644 --- a/prefs/firefox/browser.yaml +++ b/prefs/firefox/browser.yaml @@ -73,5 +73,9 @@ - name: browser.tabs.notes.enabled value: false +- name: browser.tabs.dragDrop.dragToPin.enabled + value: false + locked: true + - name: browser.tabs.dragDrop.moveOverThresholdPercent value: 50 # Percentage of tab height to trigger move over on drag-and-drop diff --git a/src/browser/base/content/zen-panels/folders-search.inc b/src/browser/base/content/zen-panels/folders-search.inc index 13805361b..1020a0d26 100644 --- a/src/browser/base/content/zen-panels/folders-search.inc +++ b/src/browser/base/content/zen-panels/folders-search.inc @@ -3,8 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + + + +diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browser/components/asrouter/modules/FeatureCallout.sys.mjs +--- a/browser/components/asrouter/modules/FeatureCallout.sys.mjs ++++ b/browser/components/asrouter/modules/FeatureCallout.sys.mjs +@@ -1046,10 +1046,11 @@ + noautofocus="true" + flip="slide" + type="arrow" + consumeoutsideclicks="never" + norolluponanchor="true" ++ nonnativepopover="true" + position="${panel_position.panel_position_string}" + ${hide_arrow ? "" : 'show-arrow=""'} + ${autohide ? "" : 'noautohide="true"'} + ${ignorekeys ? 'ignorekeys="true"' : ""} + ${no_open_on_anchor ? 'no-open-on-anchor=""' : ""} diff --git a/browser/components/customizableui/content/panelUI.inc.xhtml b/browser/components/customizableui/content/panelUI.inc.xhtml --- a/browser/components/customizableui/content/panelUI.inc.xhtml +++ b/browser/components/customizableui/content/panelUI.inc.xhtml @@ -131,7 +110,7 @@ diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/Sta diff --git a/toolkit/themes/shared/global-shared.css b/toolkit/themes/shared/global-shared.css --- a/toolkit/themes/shared/global-shared.css +++ b/toolkit/themes/shared/global-shared.css -@@ -100,10 +100,20 @@ +@@ -100,10 +100,22 @@ --panel-padding: var(--arrowpanel-padding); --panel-shadow-margin: var(--arrowpanel-shadow-margin); --menuitem-border-radius: var(--arrowpanel-menuitem-border-radius); @@ -140,12 +119,14 @@ diff --git a/toolkit/themes/shared/global-shared.css b/toolkit/themes/shared/glo + + /* stylelint-disable-next-line media-query-no-invalid */ + @media -moz-pref("widget.macos.native-popovers") and (-moz-platform: macos) { -+ background-color: transparent; -+ --panel-background: transparent; -+ --panel-shadow: none; -+ --panel-border-color: transparent; -+ --panel-shadow-margin: 0px; -+ --panel-padding: 0px; ++ &:not([nonnativepopover="true"]) { ++ background-color: transparent; ++ --panel-background: transparent; ++ --panel-shadow: none; ++ --panel-border-color: transparent; ++ --panel-shadow-margin: 0px; ++ --panel-padding: 0px; ++ } + } } @@ -300,7 +281,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm NS_OBJC_BEGIN_TRY_IGNORE_BLOCK; if (!mWindow) { -@@ -5227,10 +5282,56 @@ +@@ -5227,10 +5282,58 @@ mWindow.contentView.needsDisplay = YES; if (!nativeParentWindow || mPopupLevel != PopupLevel::Parent) { [mWindow orderFront:nil]; @@ -309,7 +290,9 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm + nsMenuPopupFrame* popupFrame = GetPopupFrame(); + if ([mWindow isKindOfClass:[PopupWindow class]] && + [(PopupWindow*)mWindow usePopover] && popupFrame && -+ popupFrame->ShouldFollowAnchor()) { ++ popupFrame->ShouldFollowAnchor() && ++ !popupFrame->PopupElement().GetBoolAttr( ++ nsGkAtoms::nonnativepopover)) { + if (nativeParentWindow) { + NSRectEdge preferredEdge = + AlignmentPositionToNSRectEdge(popupFrame->GetAlignmentPosition()); @@ -357,7 +340,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm // close other programs' context menus when ours open. if ([mWindow isKindOfClass:[PopupWindow class]] && [(PopupWindow*)mWindow isContextMenu]) { -@@ -5301,10 +5402,15 @@ +@@ -5301,10 +5404,15 @@ // of a window it hides the parent window. if (mWindowType == WindowType::Popup && nativeParentWindow) { [nativeParentWindow removeChildWindow:mWindow]; @@ -373,7 +356,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm // other programs) that a menu has closed. if ([mWindow isKindOfClass:[PopupWindow class]] && [(PopupWindow*)mWindow isContextMenu]) { -@@ -5351,10 +5457,17 @@ +@@ -5351,10 +5459,17 @@ return false; } return nsIWidget::ShouldUseOffMainThreadCompositing(); @@ -391,7 +374,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm return mWindow.isOpaque ? TransparencyMode::Opaque : TransparencyMode::Transparent; -@@ -6313,10 +6426,20 @@ +@@ -6313,10 +6428,20 @@ // We ignore aRepaint -- we have to call display:YES, otherwise the // title bar doesn't immediately get repainted and is displayed in // the wrong place, leading to a visual jump. @@ -412,7 +395,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm void nsCocoaWindow::Resize(const DesktopRect& aRect, bool aRepaint) { DoResize(aRect.x, aRect.y, aRect.width, aRect.height, aRepaint, false); -@@ -8277,18 +8400,27 @@ +@@ -8277,18 +8402,27 @@ backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation { NS_OBJC_BEGIN_TRY_BLOCK_RETURN; @@ -440,7 +423,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm // Return 0 in order to match what the system does for sheet windows and // _NSPopoverWindows. - (CGFloat)_backdropBleedAmount { -@@ -8342,10 +8474,120 @@ +@@ -8342,10 +8476,120 @@ - (void)setIsContextMenu:(BOOL)flag { mIsContextMenu = flag; @@ -576,4 +559,16 @@ diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py Atom("highest", "highest"), Atom("horizontal", "horizontal"), Atom("hover", "hover"), +@@ -756,10 +757,11 @@ + Atom("nohref", "nohref"), + Atom("noinitialselection", "noinitialselection"), + Atom("nomodule", "nomodule"), + Atom("nonce", "nonce"), + Atom("none", "none"), ++ Atom("nonnativepopover", "nonnativepopover"), + Atom("noresize", "noresize"), + Atom("normal", "normal"), + Atom("normalizeSpace", "normalize-space"), + Atom("noscript", "noscript"), + Atom("noshade", "noshade"),