Closed Bug 1710436 Opened 4 years ago Closed 4 years ago

[Wayland] Better popup dependency handling

Categories

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

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We need better popup handling when there are different popup classes opened.

  • When a top level notification popup is opened (web notification, geolocation confirmation), we can't close this popup. When a new menu popup is opened, we can't use move_to_rect function to position it due to xgd_positioner limitation (popup surfaces must overlap). So use plain gtk_window_move() here.

  • When a top level notification popup is opened and another panel (hamburger menu) is opened, use the gtk_window_move(). We need to use gtk_window_move() any time when a popup is opened but its child popup (a) can't be closed (b) does not belong to popups parent from layout perspective.

  • When a popup (a) is opened (with auto-close enabled) and another popup (b) is opened from different popup hierarchy, close the popup (a) first and then open popup (b) with move_to_rect.

This should handle all possible popup scenarios.

  • Keep strong popup hierarchy for every toplevel nsWindow.
  • Divide popups to tracked and non-tracked. Tracked popups are tracked in popup hierarchy for every toplevel window. Non-tracked popups are handled as X11 ones.
  • Map non-tracked popups as wl_surfaces and use gtk_window_move() on them.
  • Map tracked popups as xdg_popups and use gtk_window_move_to_rect() on them.

Testcase:

https://palegreendot.co.uk/collections/fresh-alcohol-fortnightly/products/premium-veg-box-fortnightly-subscription?selling_plan=441122970&variant=37737131016346

  • Keep the location popup open, try to open hamburger menu, content menus, extensions (remote) popups.
  • Open popups from URL bar - permissions popups.
  • Open Bookmark popup,Pocket popup, click away and open content menu
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/84818e46d11d [Wayland] Rework Wayland popup hierarchy, r=jhorak
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/b4a30d9e69dc [Wayland] Rework Wayland popup hierarchy, r=jhorak
Flags: needinfo?(stransky)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

This is another related regression/breakage
https://bugzilla.mozilla.org/show_bug.cgi?id=1710770

Regressions: 1715292
Regressions: 1715477
Regressions: 1752406
Regressions: 1720976
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: