From 8035b857dbccfde0fea961d41def336824311c84 Mon Sep 17 00:00:00 2001 From: Harry Twyford Date: Thu, 28 Oct 2021 14:31:54 +0000 Subject: [PATCH] Bug 1737620 - Fix misc errors in unified builds. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D129405 --- widget/cocoa/nsStandaloneNativeMenu.h | 5 +---- widget/cocoa/nsTouchBarInputIcon.mm | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/widget/cocoa/nsStandaloneNativeMenu.h b/widget/cocoa/nsStandaloneNativeMenu.h index fcf175888eb14..9d43e5e64de6b 100644 --- a/widget/cocoa/nsStandaloneNativeMenu.h +++ b/widget/cocoa/nsStandaloneNativeMenu.h @@ -7,10 +7,7 @@ #define nsStandaloneNativeMenu_h_ #include "nsIStandaloneNativeMenu.h" - -namespace mozilla::widget { -class NativeMenuMac; -} +#include "NativeMenuMac.h" class nsStandaloneNativeMenu : public nsIStandaloneNativeMenu { public: diff --git a/widget/cocoa/nsTouchBarInputIcon.mm b/widget/cocoa/nsTouchBarInputIcon.mm index 1d1b82dd0f09c..3a5c5b0c58a81 100644 --- a/widget/cocoa/nsTouchBarInputIcon.mm +++ b/widget/cocoa/nsTouchBarInputIcon.mm @@ -22,7 +22,7 @@ using namespace mozilla; using mozilla::widget::IconLoader; -static const uint32_t kIconSize = 16; +static const uint32_t kIconHeight = 16; static const CGFloat kHiDPIScalingFactor = 2.0f; nsTouchBarInputIcon::nsTouchBarInputIcon(RefPtr aDocument, TouchBarInput* aInput, @@ -82,7 +82,7 @@ if (!mSetIcon) { // Load placeholder icon. - NSSize iconSize = NSMakeSize(kIconSize, kIconSize); + NSSize iconSize = NSMakeSize(kIconHeight, kIconHeight); NSImage* placeholder = [MOZIconHelper placeholderIconWithSize:iconSize]; [mButton setImage:placeholder]; [mShareScrubber setButtonImage:placeholder]; @@ -118,7 +118,7 @@ // We ask only for the HiDPI images since all Touch Bars are Retina // displays and we have no need for icons @1x. NSImage* image = [MOZIconHelper iconImageFromImageContainer:aImage - withSize:NSMakeSize(kIconSize, kIconSize) + withSize:NSMakeSize(kIconHeight, kIconHeight) computedStyle:nullptr subrect:mImageRegionRect scaleFactor:kHiDPIScalingFactor];