Last Comment Bug 577377 - Provide a means of retrieving the screen rectangle of a popup
: Provide a means of retrieving the screen rectangle of a popup
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XP Toolkit/Widgets: Menus (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Neil Deakin (away until Oct 3)
:
:
Mentors:
Depends on: 552982
Blocks: 554919
  Show dependency treegraph
 
Reported: 2010-07-07 15:20 PDT by Neil Deakin (away until Oct 3)
Modified: 2011-06-03 14:02 PDT (History)
3 users (show)
enndeakin: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
implement this (8.48 KB, patch)
2010-07-07 15:20 PDT, Neil Deakin (away until Oct 3)
no flags Details | Diff | Splinter Review
fix up whitespace (6.27 KB, patch)
2011-03-21 06:42 PDT, Neil Deakin (away until Oct 3)
neil: review-
Details | Diff | Splinter Review
updated patch (9.22 KB, patch)
2011-04-13 10:52 PDT, Neil Deakin (away until Oct 3)
neil: review+
Details | Diff | Splinter Review

Description Neil Deakin (away until Oct 3) 2010-07-07 15:20:55 PDT
Created attachment 456348 [details] [diff] [review]
implement this

With titlebars present on a popup, there is a need to have a way to get the screen position and size including window decorations of the popup. The usual screen coordinate retrieval methods return the position and size without decorations.
Comment 1 Neil Deakin (away until Oct 3) 2011-03-21 06:42:10 PDT
Created attachment 520627 [details] [diff] [review]
fix up whitespace
Comment 2 neil@parkwaycc.co.uk 2011-03-27 16:44:22 PDT
Comment on attachment 520627 [details] [diff] [review]
fix up whitespace

This doesn't work in a popupshowing handler.

In the case of a standalone popup, the rectangle returned is that from when the popup was last shown.

In the case of a popup attached to a menu, the rectangle returned is also wrong, but in a different way which I didn't investigate further.
Comment 3 Neil Deakin (away until Oct 3) 2011-04-13 10:52:36 PDT
Created attachment 525728 [details] [diff] [review]
updated patch
Comment 4 Neil Deakin (away until Oct 3) 2011-04-13 10:55:23 PDT
The views and widgets are set to 0,0 size while closed, so the value during a popupshowing handler isn't valid. So here I just always set the rectangle to (0,0,0,0) during popupshowing.
Comment 5 Boris Zbarsky [:bz] (still a bit busy) 2011-06-01 10:18:01 PDT
Neil, please put metadata in your checkin-needed patches?
Comment 6 Neil Deakin (away until Oct 3) 2011-06-03 14:02:40 PDT
http://hg.mozilla.org/mozilla-central/rev/e33afb655182

Note You need to log in before you can comment on or make changes to this bug.