Browse Source

fix macOS build

Frank-Rainer Grahl 7 months ago
parent
commit
e8b41fd1e9

+ 596 - 0
frg/work-js/mozilla-release/patches/1510247-65a1.patch

@@ -0,0 +1,596 @@
+# HG changeset patch
+# User Jonathan Watt <jwatt@jwatt.org>
+# Date 1542215016 0
+# Node ID df022f193cb4b6d8f87504223adc2a2f8789be31
+# Parent  2b5ab76a2454022eb2485f3c9c5b95c8a5ea1d0a
+Bug 1510247. Fix some unified build issues in widget code. r=spohl
+
+Differential Revision: https://phabricator.services.mozilla.com/D13061
+
+diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm
+--- a/widget/cocoa/GfxInfo.mm
++++ b/widget/cocoa/GfxInfo.mm
+@@ -7,16 +7,17 @@
+ #include <OpenGL/CGLRenderers.h>
+ 
+ #include "mozilla/ArrayUtils.h"
+ 
+ #include "GfxInfo.h"
+ #include "nsUnicharUtils.h"
+ #include "nsExceptionHandler.h"
+ #include "nsCocoaFeatures.h"
++#include "nsCocoaUtils.h"
+ #include "nsICrashReporter.h"
+ #include "mozilla/Preferences.h"
+ #include <algorithm>
+ #include "nsCocoaUtils.h"
+ 
+ #import <Foundation/Foundation.h>
+ #import <IOKit/IOKitLib.h>
+ #import <Cocoa/Cocoa.h>
+diff --git a/widget/cocoa/RectTextureImage.h b/widget/cocoa/RectTextureImage.h
+--- a/widget/cocoa/RectTextureImage.h
++++ b/widget/cocoa/RectTextureImage.h
+@@ -1,17 +1,20 @@
+ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef RectTextureImage_h_
+ #define RectTextureImage_h_
+ 
++#include "GLTypes.h"
++#include "mozilla/gfx/2D.h"
+ #include "mozilla/RefPtr.h"
++#include "Units.h"
+ 
+ class MacIOSurface;
+ 
+ namespace mozilla {
+ 
+ namespace gl {
+ class GLContext;
+ } // namespace gl
+diff --git a/widget/cocoa/ScreenHelperCocoa.mm b/widget/cocoa/ScreenHelperCocoa.mm
+--- a/widget/cocoa/ScreenHelperCocoa.mm
++++ b/widget/cocoa/ScreenHelperCocoa.mm
+@@ -7,16 +7,18 @@
+ #include "ScreenHelperCocoa.h"
+ 
+ #import <Cocoa/Cocoa.h>
+ 
+ #include "mozilla/Logging.h"
+ #include "nsCocoaUtils.h"
+ #include "nsObjCExceptions.h"
+ 
++using namespace mozilla;
++
+ static LazyLogModule sScreenLog("WidgetScreen");
+ 
+ @interface ScreenHelperDelegate : NSObject
+ {
+   @private
+     mozilla::widget::ScreenHelperCocoa* mHelper;
+ }
+ 
+diff --git a/widget/cocoa/TextInputHandler.h b/widget/cocoa/TextInputHandler.h
+--- a/widget/cocoa/TextInputHandler.h
++++ b/widget/cocoa/TextInputHandler.h
+@@ -11,16 +11,17 @@
+ 
+ #import <Carbon/Carbon.h>
+ #import <Cocoa/Cocoa.h>
+ #include "mozView.h"
+ #include "nsString.h"
+ #include "nsCOMPtr.h"
+ #include "nsITimer.h"
+ #include "nsTArray.h"
++#include "mozilla/BasicEvents.h"
+ #include "mozilla/EventForwards.h"
+ #include "mozilla/TextEventDispatcherListener.h"
+ #include "WritingModes.h"
+ 
+ class nsChildView;
+ 
+ namespace mozilla {
+ namespace widget {
+diff --git a/widget/cocoa/VibrancyManager.mm b/widget/cocoa/VibrancyManager.mm
+--- a/widget/cocoa/VibrancyManager.mm
++++ b/widget/cocoa/VibrancyManager.mm
+@@ -1,16 +1,18 @@
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* vim: set ts=8 sts=2 et sw=2 tw=80: */
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+  * You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "VibrancyManager.h"
++
+ #include "nsChildView.h"
++#include "nsCocoaFeatures.h"
+ #import <objc/message.h>
+ 
+ using namespace mozilla;
+ 
+ void
+ VibrancyManager::UpdateVibrantRegion(VibrancyType aType,
+                                      const LayoutDeviceIntRegion& aRegion)
+ {
+diff --git a/widget/cocoa/ViewRegion.h b/widget/cocoa/ViewRegion.h
+--- a/widget/cocoa/ViewRegion.h
++++ b/widget/cocoa/ViewRegion.h
+@@ -5,16 +5,18 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef ViewRegion_h
+ #define ViewRegion_h
+ 
+ #include "Units.h"
+ #include "nsTArray.h"
+ 
++class nsChildView;
++
+ @class NSView;
+ 
+ namespace mozilla {
+ 
+ /**
+  * Manages a set of NSViews to cover a LayoutDeviceIntRegion.
+  */
+ class ViewRegion {
+@@ -36,17 +38,17 @@ public:
+   bool UpdateRegion(const mozilla::LayoutDeviceIntRegion& aRegion,
+                     const nsChildView& aCoordinateConverter,
+                     NSView* aContainerView,
+                     NSView* (^aViewCreationCallback)());
+ 
+   /**
+    * Return an NSView from the region, if there is any.
+    */
+-  NSView* GetAnyView() { return mViews.Length() > 0 ? mViews[0] : nil; }
++  NSView* GetAnyView() { return mViews.Length() > 0 ? mViews[0] : NULL; }
+ 
+ private:
+   mozilla::LayoutDeviceIntRegion mRegion;
+   nsTArray<NSView*> mViews;
+ };
+ 
+ } // namespace mozilla
+ 
+diff --git a/widget/cocoa/ViewRegion.mm b/widget/cocoa/ViewRegion.mm
+--- a/widget/cocoa/ViewRegion.mm
++++ b/widget/cocoa/ViewRegion.mm
+@@ -2,16 +2,18 @@
+ /* vim: set ts=8 sts=2 et sw=2 tw=80: */
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+  * You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "ViewRegion.h"
+ #import <Cocoa/Cocoa.h>
+ 
++#include "nsChildView.h"
++
+ using namespace mozilla;
+ 
+ ViewRegion::~ViewRegion()
+ {
+   for (size_t i = 0; i < mViews.Length(); i++) {
+     [mViews[i] removeFromSuperview];
+   }
+ }
+diff --git a/widget/cocoa/nsAppShell.mm b/widget/cocoa/nsAppShell.mm
+--- a/widget/cocoa/nsAppShell.mm
++++ b/widget/cocoa/nsAppShell.mm
+@@ -39,16 +39,17 @@
+ #if !defined(RELEASE_OR_BETA) || defined(DEBUG)
+ #include "nsSandboxViolationSink.h"
+ #endif
+ 
+ #include <IOKit/pwr_mgt/IOPMLib.h>
+ #include "nsIDOMWakeLockListener.h"
+ #include "nsIPowerManagerService.h"
+ 
++using namespace mozilla;
+ using namespace mozilla::widget;
+ 
+ #define WAKE_LOCK_LOG(...) MOZ_LOG(gMacWakeLockLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
+ static mozilla::LazyLogModule gMacWakeLockLog("MacWakeLock");
+ 
+ // A wake lock listener that disables screen saver when requested by
+ // Gecko. For example when we're playing video in a foreground tab we
+ // don't want the screen saver to turn on.
+diff --git a/widget/cocoa/nsCocoaUtils.mm b/widget/cocoa/nsCocoaUtils.mm
+--- a/widget/cocoa/nsCocoaUtils.mm
++++ b/widget/cocoa/nsCocoaUtils.mm
+@@ -7,16 +7,17 @@
+ 
+ #include "gfx2DGlue.h"
+ #include "gfxPlatform.h"
+ #include "gfxUtils.h"
+ #include "ImageRegion.h"
+ #include "nsCocoaUtils.h"
+ #include "nsChildView.h"
+ #include "nsMenuBarX.h"
++#include "nsCocoaFeatures.h"
+ #include "nsCocoaWindow.h"
+ #include "nsCOMPtr.h"
+ #include "nsIInterfaceRequestorUtils.h"
+ #include "nsIAppShellService.h"
+ #include "nsIXULWindow.h"
+ #include "nsIBaseWindow.h"
+ #include "nsIServiceManager.h"
+ #include "nsMenuUtilsX.h"
+diff --git a/widget/cocoa/nsDeviceContextSpecX.h b/widget/cocoa/nsDeviceContextSpecX.h
+--- a/widget/cocoa/nsDeviceContextSpecX.h
++++ b/widget/cocoa/nsDeviceContextSpecX.h
+@@ -3,16 +3,18 @@
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef nsDeviceContextSpecX_h_
+ #define nsDeviceContextSpecX_h_
+ 
+ #include "nsIDeviceContextSpec.h"
+ 
++#include "nsCOMPtr.h"
++
+ #include <ApplicationServices/ApplicationServices.h>
+ 
+ class nsDeviceContextSpecX : public nsIDeviceContextSpec
+ {
+ public:
+     NS_DECL_ISUPPORTS
+ 
+     nsDeviceContextSpecX();
+diff --git a/widget/cocoa/nsMacSharingService.mm.1510247.later b/widget/cocoa/nsMacSharingService.mm.1510247.later
+new file mode 100644
+--- /dev/null
++++ b/widget/cocoa/nsMacSharingService.mm.1510247.later
+@@ -0,0 +1,21 @@
++--- nsMacSharingService.mm
+++++ nsMacSharingService.mm
++@@ -1,16 +1,18 @@
++ /* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
++ /* This Source Code Form is subject to the terms of the Mozilla Public
++  * License, v. 2.0. If a copy of the MPL was not distributed with this
++  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++ 
++ #import <Cocoa/Cocoa.h>
++ 
++ #include "nsMacSharingService.h"
+++
+++#include "jsapi.h"
++ #include "nsCocoaUtils.h"
++ #include "mozilla/MacStringHelpers.h"
++ 
++ NS_IMPL_ISUPPORTS(nsMacSharingService, nsIMacSharingService)
++ 
++ // List of sharingProviders that we do not want to expose to
++ // the user, because they are duplicates or do not work correctly
++ // within the context
+diff --git a/widget/cocoa/nsMenuItemIconX.h b/widget/cocoa/nsMenuItemIconX.h
+--- a/widget/cocoa/nsMenuItemIconX.h
++++ b/widget/cocoa/nsMenuItemIconX.h
+@@ -12,16 +12,17 @@
+ 
+ #include "mozilla/RefPtr.h"
+ #include "nsCOMPtr.h"
+ #include "imgINotificationObserver.h"
+ #include "nsIContentPolicy.h"
+ 
+ class nsIURI;
+ class nsIContent;
++class nsIPrincipal;
+ class imgRequestProxy;
+ class nsMenuObjectX;
+ 
+ #import <Cocoa/Cocoa.h>
+ 
+ class nsMenuItemIconX : public imgINotificationObserver
+ {
+ public:
+diff --git a/widget/cocoa/nsMenuItemIconX.mm b/widget/cocoa/nsMenuItemIconX.mm
+--- a/widget/cocoa/nsMenuItemIconX.mm
++++ b/widget/cocoa/nsMenuItemIconX.mm
+@@ -36,16 +36,18 @@
+ #include "nsMenuItemX.h"
+ #include "gfxPlatform.h"
+ #include "imgIContainer.h"
+ #include "nsCocoaUtils.h"
+ #include "nsContentUtils.h"
+ #include "nsIContentPolicy.h"
+ #include "nsComputedDOMStyle.h"
+ 
++using namespace mozilla;
++
+ using mozilla::dom::Element;
+ using mozilla::gfx::SourceSurface;
+ 
+ static const uint32_t kIconWidth = 16;
+ static const uint32_t kIconHeight = 16;
+ 
+ NS_IMPL_ISUPPORTS(nsMenuItemIconX, imgINotificationObserver)
+ 
+diff --git a/widget/cocoa/nsMenuItemX.mm b/widget/cocoa/nsMenuItemX.mm
+--- a/widget/cocoa/nsMenuItemX.mm
++++ b/widget/cocoa/nsMenuItemX.mm
+@@ -17,16 +17,18 @@
+ 
+ #include "mozilla/dom/Element.h"
+ #include "nsIWidget.h"
+ #include "nsIDocument.h"
+ #include "nsIDOMDocument.h"
+ #include "nsIDOMElement.h"
+ #include "nsIDOMEvent.h"
+ 
++using namespace mozilla;
++
+ nsMenuItemX::nsMenuItemX()
+ {
+   mType           = eRegularMenuItemType;
+   mNativeMenuItem = nil;
+   mMenuParent     = nullptr;
+   mMenuGroupOwner = nullptr;
+   mIsChecked      = false;
+ 
+diff --git a/widget/cocoa/nsMenuX.h b/widget/cocoa/nsMenuX.h
+--- a/widget/cocoa/nsMenuX.h
++++ b/widget/cocoa/nsMenuX.h
+@@ -3,16 +3,17 @@
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef nsMenuX_h_
+ #define nsMenuX_h_
+ 
+ #import <Cocoa/Cocoa.h>
+ 
++#include "mozilla/EventForwards.h"
+ #include "mozilla/RefPtr.h"
+ #include "mozilla/UniquePtr.h"
+ #include "nsMenuBaseX.h"
+ #include "nsMenuBarX.h"
+ #include "nsMenuGroupOwnerX.h"
+ #include "nsCOMPtr.h"
+ #include "nsChangeObserver.h"
+ 
+diff --git a/widget/cocoa/nsPrintSettingsX.mm b/widget/cocoa/nsPrintSettingsX.mm
+--- a/widget/cocoa/nsPrintSettingsX.mm
++++ b/widget/cocoa/nsPrintSettingsX.mm
+@@ -5,19 +5,19 @@
+ 
+ #include "nsPrintSettingsX.h"
+ #include "nsObjCExceptions.h"
+ 
+ #include "plbase64.h"
+ #include "plstr.h"
+ 
+ #include "nsCocoaUtils.h"
++#include "nsXULAppAPI.h"
+ 
+ #include "mozilla/Preferences.h"
+-#include "nsXULAppAPI.h"  // for XRE_IsContentProcess()
+ 
+ using namespace mozilla;
+ 
+ #define MAC_OS_X_PAGE_SETUP_PREFNAME    "print.macosx.pagesetup-2"
+ #define COCOA_PAPER_UNITS_PER_INCH      72.0
+ 
+ NS_IMPL_ISUPPORTS_INHERITED(nsPrintSettingsX, nsPrintSettings, nsPrintSettingsX)
+ 
+diff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp
+--- a/widget/headless/HeadlessWidget.cpp
++++ b/widget/headless/HeadlessWidget.cpp
+@@ -6,18 +6,22 @@
+ #include "HeadlessCompositorWidget.h"
+ #include "Layers.h"
+ #include "BasicLayers.h"
+ #include "BasicEvents.h"
+ #include "MouseEvents.h"
+ #include "mozilla/gfx/gfxVars.h"
+ #include "mozilla/ClearOnShutdown.h"
+ #include "mozilla/TextEvents.h"
++#include "mozilla/widget/HeadlessWidgetTypes.h"
++#include "mozilla/widget/PlatformWidgetTypes.h"
++#include "nsIScreen.h"
+ #include "HeadlessKeyBindings.h"
+ 
++using namespace mozilla;
+ using namespace mozilla::gfx;
+ using namespace mozilla::layers;
+ 
+ using mozilla::LogLevel;
+ 
+ #ifdef MOZ_LOGGING
+ 
+ #include "mozilla/Logging.h"
+diff --git a/widget/nsDragServiceProxy.cpp b/widget/nsDragServiceProxy.cpp
+--- a/widget/nsDragServiceProxy.cpp
++++ b/widget/nsDragServiceProxy.cpp
+@@ -8,19 +8,23 @@
+ #include "nsIDocument.h"
+ #include "nsISupportsPrimitives.h"
+ #include "mozilla/dom/TabChild.h"
+ #include "mozilla/gfx/2D.h"
+ #include "mozilla/UniquePtr.h"
+ #include "mozilla/Unused.h"
+ #include "nsContentUtils.h"
+ 
++using mozilla::CSSIntRegion;
+ using mozilla::ipc::Shmem;
+ using mozilla::dom::TabChild;
+ using mozilla::dom::OptionalShmem;
++using mozilla::gfx::DataSourceSurface;
++using mozilla::gfx::SourceSurface;
++using mozilla::gfx::SurfaceFormat;
+ using mozilla::LayoutDeviceIntRect;
+ using mozilla::Maybe;
+ 
+ NS_IMPL_ISUPPORTS_INHERITED0(nsDragServiceProxy, nsBaseDragService)
+ 
+ nsDragServiceProxy::nsDragServiceProxy()
+ {
+ }
+@@ -43,22 +47,21 @@ nsDragServiceProxy::InvokeDragSessionImp
+                                                   dataTransfers,
+                                                   false,
+                                                   child->Manager(),
+                                                   nullptr);
+ 
+   LayoutDeviceIntRect dragRect;
+   if (mHasImage || mSelection) {
+     nsPresContext* pc;
+-    RefPtr<mozilla::gfx::SourceSurface> surface;
++    RefPtr<SourceSurface> surface;
+     DrawDrag(mSourceNode, aRegion, mScreenPosition, &dragRect, &surface, &pc);
+ 
+     if (surface) {
+-      RefPtr<mozilla::gfx::DataSourceSurface> dataSurface =
+-        surface->GetDataSurface();
++      RefPtr<DataSourceSurface> dataSurface = surface->GetDataSurface();
+       if (dataSurface) {
+         size_t length;
+         int32_t stride;
+         Maybe<Shmem> maybeShm = nsContentUtils::GetSurfaceData(dataSurface,
+                                                                &length,
+                                                                &stride,
+                                                                child);
+         if (maybeShm.isNothing()) {
+diff --git a/widget/nsDragServiceProxy.cpp.1510247.later b/widget/nsDragServiceProxy.cpp.1510247.later
+new file mode 100644
+--- /dev/null
++++ b/widget/nsDragServiceProxy.cpp.1510247.later
+@@ -0,0 +1,20 @@
++--- nsDragServiceProxy.cpp
+++++ nsDragServiceProxy.cpp
++@@ -96,14 +99,14 @@ nsDragServiceProxy::InvokeDragSessionImp
++                                        stride, dataSurface->GetFormat(),
++                                        dragRect, principalURISpec);
++         StartDragSession();
++         return NS_OK;
++       }
++     }
++   }
++ 
++-  mozilla::Unused << child->SendInvokeDragSession(dataTransfers, aActionType,
++-                                                  mozilla::void_t(), 0, static_cast<gfx::SurfaceFormat>(0), dragRect,
++-                                                  principalURISpec);
+++  mozilla::Unused << child->SendInvokeDragSession(
+++      dataTransfers, aActionType, mozilla::void_t(), 0,
+++      static_cast<SurfaceFormat>(0), dragRect, principalURISpec);
++   StartDragSession();
++   return NS_OK;
++ }
+diff --git a/widget/nsIDeviceContextSpec.h b/widget/nsIDeviceContextSpec.h
+--- a/widget/nsIDeviceContextSpec.h
++++ b/widget/nsIDeviceContextSpec.h
+@@ -1,16 +1,17 @@
+ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef nsIDeviceContextSpec_h___
+ #define nsIDeviceContextSpec_h___
+ 
++#include "gfxPoint.h"
+ #include "nsISupports.h"
+ 
+ class nsIWidget;
+ class nsIPrintSettings;
+ 
+ namespace mozilla {
+ namespace gfx{
+ class DrawEventRecorder;
+diff --git a/widget/nsNativeTheme.cpp b/widget/nsNativeTheme.cpp
+--- a/widget/nsNativeTheme.cpp
++++ b/widget/nsNativeTheme.cpp
+@@ -18,16 +18,17 @@
+ #include "nsThemeConstants.h"
+ #include "nsIComponentManager.h"
+ #include "nsPIDOMWindow.h"
+ #include "nsProgressFrame.h"
+ #include "nsMeterFrame.h"
+ #include "nsMenuFrame.h"
+ #include "nsRangeFrame.h"
+ #include "nsCSSRendering.h"
++// #include "mozilla/ComputedStyle.h"
+ #include "mozilla/EventStates.h"
+ #include "mozilla/dom/Element.h"
+ #include "mozilla/dom/HTMLBodyElement.h"
+ #include "mozilla/dom/HTMLProgressElement.h"
+ #include "nsIDocumentInlines.h"
+ #include <algorithm>
+ 
+ using namespace mozilla;
+diff --git a/widget/nsNativeTheme.h b/widget/nsNativeTheme.h
+--- a/widget/nsNativeTheme.h
++++ b/widget/nsNativeTheme.h
+@@ -6,16 +6,17 @@
+ // This defines a common base class for nsITheme implementations, to reduce
+ // code duplication.
+ 
+ #ifndef _NSNATIVETHEME_H_
+ #define _NSNATIVETHEME_H_
+ 
+ #include "nsAlgorithm.h"
+ #include "nsIAtom.h"
++#include "nsColor.h"
+ #include "nsCOMPtr.h"
+ #include "nsString.h"
+ #include "nsMargin.h"
+ #include "nsGkAtoms.h"
+ #include "nsTArray.h"
+ #include "nsINamed.h"
+ #include "nsITimer.h"
+ #include "nsIContent.h"
+diff --git a/widget/nsPrintSettingsService.h b/widget/nsPrintSettingsService.h
+--- a/widget/nsPrintSettingsService.h
++++ b/widget/nsPrintSettingsService.h
+@@ -4,22 +4,21 @@
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #ifndef nsPrintSettingsService_h
+ #define nsPrintSettingsService_h
+ 
+ #include "mozilla/embedding/PPrinting.h"
+ #include "nsCOMPtr.h"
++#include "nsIPrintSettings.h"
+ #include "nsIPrintSettingsService.h"
+ #include "nsString.h"
+ #include "nsFont.h"
+ 
+-class nsIPrintSettings;
+-
+ /**
+  * Class nsPrintSettingsService.  Base class for the platform specific widget
+  * subclasses to inherit from.
+  */
+ class nsPrintSettingsService : public nsIPrintSettingsService
+ {
+ public:
+   NS_DECL_ISUPPORTS
+diff --git a/widget/nsTransferable.cpp b/widget/nsTransferable.cpp
+--- a/widget/nsTransferable.cpp
++++ b/widget/nsTransferable.cpp
+@@ -32,16 +32,17 @@ Notes to self:
+ #include "nsCRT.h"
+ #include "nsNetUtil.h"
+ #include "nsIDOMNode.h"
+ #include "nsIOutputStream.h"
+ #include "nsIInputStream.h"
+ #include "nsIWeakReferenceUtils.h"
+ #include "nsIFile.h"
+ #include "nsILoadContext.h"
++#include "nsXULAppAPI.h"
+ #include "mozilla/UniquePtr.h"
+ 
+ NS_IMPL_ISUPPORTS(nsTransferable, nsITransferable)
+ 
+ size_t GetDataForFlavor (const nsTArray<DataStruct>& aArray,
+                            const char* aDataFlavor)
+ {
+   for (size_t i = 0 ; i < aArray.Length () ; ++i) {

+ 70 - 0
frg/work-js/mozilla-release/patches/NOBUG-textrange-25319.patch

@@ -0,0 +1,70 @@
+# HG changeset patch
+# User Frank-Rainer Grahl <frgrahl@gmx.net>
+# Date 1710086729 -3600
+# Parent  16c87c1a7f8dfe675dbaa3507498ee1c7d595d37
+No Bug - Fix macOS unified build TextRange breakage. r=me a=me
+
+diff --git a/toolkit/xre/nsCommandLineServiceMac.cpp b/toolkit/xre/nsCommandLineServiceMac.cpp
+--- a/toolkit/xre/nsCommandLineServiceMac.cpp
++++ b/toolkit/xre/nsCommandLineServiceMac.cpp
+@@ -1,19 +1,28 @@
+ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "nsCommandLineServiceMac.h"
+ #include "MacApplicationDelegate.h"
+ 
++// Some defines will conflict with the macOS SDK
++#  define TextRange _TextRange
++#  define TextRangeArray _TextRangeArray
++#  define Comment _Comment
++
+ #include <CoreFoundation/CoreFoundation.h>
+ #include <Carbon/Carbon.h>
+ 
++#  undef TextRange
++#  undef TextRangeArray
++#  undef Comment
++
+ namespace CommandLineServiceMac {
+ 
+ static const int kArgsGrowSize = 20;
+ 
+ static char** sArgs = nullptr;
+ static int sArgsAllocated = 0;
+ static int sArgsUsed = 0;
+ 
+diff --git a/xpcom/build/XPCOM.h b/xpcom/build/XPCOM.h
+--- a/xpcom/build/XPCOM.h
++++ b/xpcom/build/XPCOM.h
+@@ -129,18 +129,28 @@
+ // interfaces that include something above
+ 
+ #include "nsILocalFileWin.h"
+ #include "nsIObjectInputStream.h"
+ #include "nsIObjectOutputStream.h"
+ #include "nsIPipe.h"
+ 
+ #ifdef MOZ_WIDGET_COCOA
++// Some defiens will be conflict with OSX SDK
++#  define TextRange _TextRange
++#  define TextRangeArray _TextRangeArray
++#  define Comment _Comment
++
+ #include "nsILocalFileMac.h"
+ #include "nsIMacUtils.h"
++
++#  undef TextRange
++#  undef TextRangeArray
++#  undef Comment
++
+ #endif
+ 
+ // xpcom/glue utility headers
+ 
+ #include "nsComponentManagerUtils.h"
+ #include "nsServiceManagerUtils.h"
+ 
+ #include "nsIWeakReferenceUtils.h"

+ 3 - 0
frg/work-js/mozilla-release/patches/series

@@ -8122,6 +8122,9 @@ TOP-NOBUG-REGEXP-47-fixes-25319.patch
 TOP-1880562-NSS3902-11509.patch
 TOP-1880562-NSS3902-11509.patch
 NOBUG-JSFIXUPS-25319.patch
 NOBUG-JSFIXUPS-25319.patch
 1462261-3-25319.patch
 1462261-3-25319.patch
+1510247-65a1.patch
+NOBUG-textrange-25319.patch
+
 
 
 ipc-start
 ipc-start
 
 

+ 2 - 0
frg/work-js/mozilla-release/patches/series-test

@@ -8025,3 +8025,5 @@ TOP-NOBUG-REGEXP-47-fixes-25319.patch
 TOP-1880562-NSS3902-11509.patch
 TOP-1880562-NSS3902-11509.patch
 NOBUG-JSFIXUPS-25319.patch
 NOBUG-JSFIXUPS-25319.patch
 1462261-3-25319.patch
 1462261-3-25319.patch
+1510247-65a1.patch
+NOBUG-textrange-25319.patch