Provide a means of retrieving the screen rectangle of a popup

RESOLVED FIXED

Status

()

Core
XP Toolkit/Widgets: Menus
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Neil Deakin, Assigned: Neil Deakin)

Tracking

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

9.22 KB, patch
neil@parkwaycc.co.uk
: review+
Details | Diff | Splinter Review
(Assignee)

Description

7 years ago
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.
(Assignee)

Updated

7 years ago
Blocks: 554919
(Assignee)

Comment 1

6 years ago
Created attachment 520627 [details] [diff] [review]
fix up whitespace
Attachment #456348 - Attachment is obsolete: true
Attachment #520627 - Flags: review?(neil)

Comment 2

6 years ago
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.
Attachment #520627 - Flags: review?(neil) → review-
(Assignee)

Comment 3

6 years ago
Created attachment 525728 [details] [diff] [review]
updated patch
Attachment #520627 - Attachment is obsolete: true
Attachment #525728 - Flags: review?(neil)
(Assignee)

Comment 4

6 years ago
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.

Updated

6 years ago
Attachment #525728 - Flags: review?(neil) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
Neil, please put metadata in your checkin-needed patches?
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
(Assignee)

Comment 6

6 years ago
http://hg.mozilla.org/mozilla-central/rev/e33afb655182
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.