Closed Bug 1239007 Opened 9 years ago Closed 9 years ago

Use strongly-typed rects for GeckoRectToCocoaRect and CocoaRectToGeckoRect in nsCocoaUtils

Categories

(Core :: Widget: Cocoa, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(1 file)

As noted in bug 890156 comments 153 and 154, we can replace nsIntRect by correctly-typed rects here to make the code more self-documenting and less error-prone.
This is pretty straightforward; should not change any behavior.
Attachment #8706983 - Flags: review?(mstange)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8706983 [details] [diff] [review] Replace nsIntRect by strongly-typed rects in a couple of nsCocoaUtils functions Review of attachment 8706983 [details] [diff] [review]: ----------------------------------------------------------------- Great cleanup! ::: widget/cocoa/nsCocoaUtils.h @@ +220,5 @@ > // (NSRect) contain an origin (x,y) in a coordinate system with (0,0) > // in the bottom-left of the primary screen. Both nsRect and NSRect > // contain width/height info, with no difference in their use. > // This function does no scaling, so the Gecko coordinates are > + // expected to be desktop pixels, which we treat as equal to Cocoa points. Would it be correct to change this to "expected to be desktop pixels, which are the same size as Cocoa points by definition." ?
Attachment #8706983 - Flags: review?(mstange) → review+
Indeed - I'll do that, thanks.
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9f9b36c1a2eec7626e6b749e46ab0a8bf3323e2 Bug 1239007 - Replace nsIntRect by strongly-typed rects in a couple of nsCocoaUtils functions. r=mstange
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Depends on: 1244129
No longer depends on: 1244129
Backed out of aurora-46, see bug 890156 comment 168. Bumping target milestone to 47.
Target Milestone: mozilla46 → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: