Closed Bug 984242 Opened 10 years ago Closed 10 years ago

Fix unused function warnings in widget/cocoa/nsChildView.mm

Categories

(Core :: Widget: Cocoa, defect, P4)

x86_64
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

widget/cocoa/nsChildView.mm:230:1 [-Wunused-function] unused function 'NSRectToGeckoRect'                                                                                   
widget/cocoa/nsChildView.mm:239:1 [-Wunused-function] unused function 'ConvertGeckoRectToMacRect'

Bug 674373 replaced nsChildView::GetBounds()'s call to NSRectToGeckoRect() with CocoaPointsToDevPixels() in https://hg.mozilla.org/mozilla-central/rev/1d3de8da2508
Attachment #8392053 - Flags: review?(joshmoz)
Comment on attachment 8392053 [details] [diff] [review]
fix-cocoa-warnings.patch

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

Can we just delete that function and use this instead?

http://mxr.mozilla.org/mozilla-central/source/widget/cocoa/nsCocoaUtils.h#282
Attachment #8392053 - Flags: review?(joshmoz)
(In reply to Josh Aas (Mozilla Corporation) from comment #1)
> Can we just delete that function and use this instead?
> 
> http://mxr.mozilla.org/mozilla-central/source/widget/cocoa/nsCocoaUtils.h#282

I'm not sure I understand. No one is calling nsChildView.mm's (file) static function NSRectToGeckoRect() (which duplicated the nsCocoaUtils::NSRectToGeckoRect() function you linked to). nsChildView::GetBounds() used to call this NSRectToGeckoRect(), but that call was replaced with a call to CocoaPointsToDevPixels() in 2012:

https://hg.mozilla.org/mozilla-central/rev/1d3de8da2508#l7.76

Do you mean to replace nsChildView::GetBounds() call to CocoaPointsToDevPixels() with nsCocoaUtils::NSRectToGeckoRect()?
Flags: needinfo?(joshmoz)
Comment on attachment 8392053 [details] [diff] [review]
fix-cocoa-warnings.patch

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

My apologies, I was in a hurry and mis-read your patch the first time. Looks good to me.
Attachment #8392053 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/792f1f76d7a6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: