Closed Bug 1706434 Opened 4 years ago Closed 4 years ago

Make devtools/client/framework/test/browser_toolbox_zoom_popup.js pass with native context menus

Categories

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

All
macOS
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox89 --- fixed
firefox90 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: [proton-uplift])

Attachments

(2 files)

This test checks that various popups open in the right place, even if the devtools UI is zoomed.
One of the menus it checks is a native menu; it's the overflow menu for the tabs in the inspector's right pane (Layout / Computed / Changes / ...).
We cannot query the true screen rect for a native menu, but we can query the position at which we asked the system to display it, which is all that the test needs to check.

The position of this rectangle is the position at which we asked the OS to open the menu.

Depends on D112803

getBoxQuads does not work with native menus because there is no visible layout
box for a native menu's DOM element.
getOuterScreenRect works with both native and non-native menus.
For non-native menus it is fully accurate, and for native menus it has a useful
position component which reflects the position at which we asked the OS to open
the menu, which is enough to test what the test wants to test.

Depends on D112804

Blocks: 1700724
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/a7c2c78ce3f6 For native menus, make XULPopupElement.getOuterScreenRect() return the rect that the menu was initialized with. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/4e03c09c8d1c Use getOuterScreenRect instead of getBoxQuads to query the menu rect in this test. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Whiteboard: [proton-uplift]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: