Closed Bug 1271867 Opened 4 years ago Closed 4 years ago

Update our usage of NSWindow::convertBaseToScreen/convertScreenToBase to modern ApplicationKit API

Categories

(Core :: Widget: Cocoa, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox46 --- wontfix
firefox47 --- wontfix
firefox48 --- wontfix
firefox49 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file)

There are a whole bunch of deprecation warnings for usage of NSWindow::convertBaseToScreen/convertScreenToBase when compiling widget code. We should update to modern ApplicationKit API to avoid these warnings.
Attached patch patchSplinter Review
Attachment #8751066 - Flags: review?(mstange)
Comment on attachment 8751066 [details] [diff] [review]
patch

Review of attachment 8751066 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/cocoa/nsCocoaUtils.h
@@ +183,5 @@
>      return NSMakePoint((CGFloat)aPt.x / aBackingScale,
>                         (CGFloat)aPt.y / aBackingScale);
>    }
>  
> +  // Implements an NSPoint equivalent of NSWindow::convertRectFromScreen.

Obj-C method signatures are written as "-[NSWindow convertRectFromScreen:]".

@@ +185,5 @@
>    }
>  
> +  // Implements an NSPoint equivalent of NSWindow::convertRectFromScreen.
> +  static NSPoint
> +  convertPointFromScreen(NSWindow* aWindow, const NSPoint& aPt)

I'd prefer this method to start with an uppercase C. I'd rather have consistency with the other nsCocoaUtils methods than with the convertRectFromScreen method it calls.

@@ +192,5 @@
> +  }
> +
> +  // Implements an NSPoint equivalent of NSWindow::convertRectToScreen.
> +  static NSPoint
> +  convertPointToScreen(NSWindow* aWindow, const NSPoint& aPt)

same here
Attachment #8751066 - Flags: review?(mstange) → review+
This is using a 10.7+ API, so let's not accidentally uplift the patch.
https://hg.mozilla.org/mozilla-central/rev/bade5f18dc94
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.