From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- widget/cocoa/MOZIconHelper.mm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'widget/cocoa/MOZIconHelper.mm') diff --git a/widget/cocoa/MOZIconHelper.mm b/widget/cocoa/MOZIconHelper.mm index e15407b797..f9c8f02406 100644 --- a/widget/cocoa/MOZIconHelper.mm +++ b/widget/cocoa/MOZIconHelper.mm @@ -32,11 +32,11 @@ if (aScaleFactor != 0.0f) { rv = nsCocoaUtils::CreateNSImageFromImageContainer( aImage, imgIContainer::FRAME_CURRENT, aPresContext, aComputedStyle, - &retainedImage, aScaleFactor, &isEntirelyBlack); + aSize, &retainedImage, aScaleFactor, &isEntirelyBlack); } else { rv = nsCocoaUtils::CreateDualRepresentationNSImageFromImageContainer( aImage, imgIContainer::FRAME_CURRENT, aPresContext, aComputedStyle, - &retainedImage, &isEntirelyBlack); + aSize, &retainedImage, &isEntirelyBlack); } NSImage* image = [retainedImage autorelease]; @@ -45,10 +45,6 @@ return nil; } - int32_t origWidth = 0, origHeight = 0; - aImage->GetWidth(&origWidth); - aImage->GetHeight(&origHeight); - // If all the color channels in the image are black, treat the image as a // template. This will cause macOS to use the image's alpha channel as a mask // and it will fill it with a color that looks good in the context that it's -- cgit v1.2.3