Closed Bug 1392549 Opened 8 years ago Closed 8 years ago

nsIRollupListener::Rollup expects mouse pointer position in device pixels

Categories

(Core :: Widget: Cocoa, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jessica, Assigned: jessica)

Details

Attachments

(1 file, 1 obsolete file)

See this piece of code [1], widget code should pass mouse poisition in device pixels. This bug can be revealed by using the search box in the upper right corner of the browser. Type any word, e.g. "test", until a list of suggestion shows up, clicking any other part in the search input box should not cause the panel (list of suggestion) to hide (and show again). [1] http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/layout/xul/nsXULPopupManager.cpp#301-302
Attached patch patch, v1. (obsolete) — Splinter Review
Comment on attachment 8899761 [details] [diff] [review] patch, v1. Hi Markus, can I have your review on this? Thanks.
Attachment #8899761 - Flags: review?(mstange)
Comment on attachment 8899761 [details] [diff] [review] patch, v1. Review of attachment 8899761 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/cocoa/nsChildView.mm @@ +4210,5 @@ > NSPoint point = [NSEvent mouseLocation]; > FlipCocoaScreenCoordinate(point); > + LayoutDeviceIntPoint devPoint = > + mGeckoChild->CocoaPointsToDevPixels(point); > + gfx::IntPoint pos = gfx::IntPoint::Truncate(devPoint.x, devPoint.y); devPoint already has integer components here, so you don't need Truncate. I think devPoint.ToUnknown() will give you an IntPoint.
Attachment #8899761 - Flags: review?(mstange) → review+
Attached patch patch, v2.Splinter Review
Use .ToUnknownPoint() to get IntPoint. Thanks Markus.
Assignee: nobody → jjong
Attachment #8899761 - Attachment is obsolete: true
Attachment #8900073 - Flags: review+
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/143df4bd4a59 Pass mouse position to nsIRollupListener::Rollup in device pixels. r=mstange
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: