Closed Bug 1967196 Opened 1 year ago Closed 1 year ago

Implement a policy to prevent multiple popups from appearing simultaneously

Categories

(Toolkit :: PopupNotifications and Notification Bars, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: baku, Assigned: baku)

References

(Regressed 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(2 files)

We're facing multiple bugs caused by overlapping popups, often triggered by malicious sites or extensions. Multiple popups are a poor UX pattern and confuse users. A centralized policy allows async or low-priority popups to be queued and displayed safely.

The logic I would like to implement is as follows:

  • Popups with the queueable attribute set to true can be displayed asynchronously.
  • Only one queueable popup can be visible at a time. The next one is shown once the current one is dismissed or hidden.
  • When a non-queueable popup is shown, any currently visible queueable popup is dismissed.
Assignee: nobody → amarchesini
Attachment #9488608 - Attachment description: WIP: Bug 1967196 - Introduction of a Popup queue, → Bug 1967196 - Introduction of a Popup queue, r?smaug
Attachment #9488608 - Attachment description: Bug 1967196 - Introduction of a Popup queue, r?smaug → Bug 1967196 - Introduction of a Popup queue,
Attachment #9490080 - Attachment description: WIP: Bug 1967196 - Expose the popup queue logic to webRTC dialogs, → Bug 1967196 - Expose the popup queue logic to webRTC dialogs,
Severity: -- → N/A
Component: General → PopupNotifications and Notification Bars
Priority: -- → P2
Product: Firefox → Toolkit
Whiteboard: [addons-jira]

This is a blocker to expanding the availability of the action.openPopup() extension API. The current patches here offer the ability to queue panels, but do not apply that to extension popups. Implementing that could be a part of bug 1799347 or a separate bug.

Blocks: 1799344
See Also: → 1799347
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cc8b8d3f5545 https://hg.mozilla.org/integration/autoland/rev/d79a28a39a06 Revert "Bug 1967196 - Expose the popup queue logic to webRTC dialogs, r=emz" for causing bc failures @ browser_TabUnloader.js

Backed out for causing bc failures @ browser_TabUnloader.js

Flags: needinfo?(amarchesini)
Flags: needinfo?(amarchesini)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3c7259d00dde https://hg.mozilla.org/integration/autoland/rev/9945a9839081 Revert "Bug 1967196 - Expose the popup queue logic to webRTC dialogs, r=emz" for causing Mn assertion failures @ ClearOnShutdown.cpp

Backed out for causing Mn assertion failures @ ClearOnShutdown.cpp

Backout link: hg.mozilla.org/integration/autoland/rev/9945a98390811f55b4364894d97c45143e78b513

Push with failures

Failure log -> Assertion failure: false (ClearOnShutdown for phase that already was cleared), at /builds/worker/checkouts/gecko/xpcom/base/ClearOnShutdown.cpp:20

Status: RESOLVED → REOPENED
Flags: needinfo?(amarchesini)
Resolution: FIXED → ---
Target Milestone: 142 Branch → ---

Stack of crash, for future reference:

MOZ_ASSERT(false) (ClearOnShutdown for phase that already was cleared) [@ mozilla::ClearOnShutdown_Internal::InsertIntoShutdownList] | browser/components/sidebar/tests/marionette/test_initialize_vertical_tabs.py TestInitializeVerticalTabs.test_restore_tabstrip_customizations

0 xul.dll!mozilla::ClearOnShutdown_Internal::InsertIntoShutdownList(mozilla::ClearOnShutdown_Internal::ShutdownObserver*, mozilla::ShutdownPhase) [ClearOnShutdown.cpp:...]
1 xul.dll!mozilla::ClearOnShutdown(mozilla::StaticRefPtr<PopupQueue>*, mozilla::ShutdownPhase) [ClearOnShutdown.cpp:...]
2 xul.dll!PopupQueue::GetInstance() [PopupQueue.cpp:...]
3 xul.dll!nsXULPopupManager::HidePopup(mozilla::dom::Element*, mozilla::EnumSet<HidePopupOption,unsigned char>, mozilla::dom::Element*) [nsXULPopupManager.cpp:...]
4 xul.dll!nsXULTooltipListener::HideTooltip() [nsXULTooltipListener.cpp:...]
5 xul.dll!nsXULTooltipListener::~nsXULTooltipListener() [nsXULTooltipListener.cpp:...]
6 xul.dll!nsXULTooltipListener::Release() [nsXULTooltipListener.cpp:...]
7 xul.dll!mozilla::dom::CallbackObjectHolder<mozilla::dom::EventListener,nsIDOMEventListener>::UnlinkSelf() [CallbackObject.h:...]
8 xul.dll!mozilla::dom::CallbackObjectHolder<mozilla::dom::EventListener,nsIDOMEventListener>::~CallbackObjectHolder() [CallbackObject.h:...]
9 xul.dll!mozilla::EventListenerManager::Listener::~Listener() [EventListenerManager.h:...]
...
15 xul.dll!mozilla::EventListenerManager::ListenerArray::Release() [EventListenerManager.h:...]
...
24 xul.dll!mozilla::EventListenerManager::EventListenerMap::Clear() [EventListenerManager.h:...]
25 xul.dll!mozilla::EventListenerManager::RemoveAllListenersSilently() [EventListenerManager.cpp:...]
26 xul.dll!mozilla::EventListenerManager::Disconnect() [EventListenerManager.cpp:...]
27 xul.dll!mozilla::EventListenerManager::cycleCollection::Unlink(void*) [EventListenerManager.cpp:...]

Flags: needinfo?(amarchesini)
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Regressions: 1974591
QA Whiteboard: [qa-triage-done-c143/b142]
Regressions: 1982832
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: