Some doorhangers are anchored to the Extensions Button via
PopupNotifications.show() + gUnifiedExtensions.getPopupAnchorID().
The default behavior of PopupNotifications is to fall back to a
different anchor if the specified anchor is invisible. But if the
Extensions Button is hidden, we want to show it as needed, instead of
triggering the fallback.
This patch reveals the Extensions Button when PopupNotifications is
about to show the panel. This button will automatically be hidden
when the doorhanger is closed, as verified by the tests.
Differential Revision: https://phabricator.services.mozilla.com/D248163
Content Analysis needs to be able to show a tab-modal dialog in the
sidebar, in case users paste text into a GenAI chatbot, etc. The dialogs
need to be tab-modal because the "DLP busy" dialog needs to be closable
by the JS code when the operation is done.
This change detects whether a dialog is trying to be displayed from a
browser inside the sidebar and shows it correctly.
Note that this does not change how extensions behave; if they try to
display a tab-modal dialog it will end up being window-modal (see
discussion in bug 1680066 and bug 1513656). I had a patch to fix this
but ran into some window leaks during tests that I was unable to address.
Differential Revision: https://phabricator.services.mozilla.com/D242957
This patch adds the most basic tab interaction metrics for tab groups.
As discussed in standup, we agreed to move the `remove_` class of
metrics into its own bug due to extra complexity involved in correctly
capturing these events.
One other thing we discussed was what the scope of events should be for
the `close_` class of events, i.e. should we *only* capture an event
when someone clicks the "X" button or closes from the TOM menu, or
should we also account for things like context menus, keyboard
shortcuts, etc.? Originally we agreed to capture _all_ tab close events
and mark any source that was not one of the above mentioned two as
unknown. However, after thinking about this more, I don't believe this
is the right approach. There are many places in the codebase where a tab
is closed but not because a user deliberately did it (e.g. when moving a
tab to a new window — this is actually done by creating a new tab in a
new window and closing the old). We currently don't distinguish between
user-initiated close actions, so it would take some time to find all
these places and exclude them.
I favour an explicit inclusion approach (which is what we are doing
elsewhere). In this patch I added events for:
- closing a tab from the "X" close button (`close_tabstrip`)
- closing a tab from the tab context menu (`close_tabstrip`)
- closing a tab from the TOM (`close_tabmenu`)
There are other places that could potentially be
addressed, so I suggest moving these to a follow-up bug and addressing
them for 139.
Differential Revision: https://phabricator.services.mozilla.com/D244915
Each window gets the observe call once. gBrowser.selectedBrowser refers to the currently selected tab and we check against that to verify if the target browser instance is in the current window.
This patch changes it to comparing windows instead of browser instances.
Differential Revision: https://phabricator.services.mozilla.com/D238974
- alt+hover to trigger LinkPreview
- add LinkPreview.sys.mjs modules
- disable browser.ml.linkPreview.enabled by default
- use setOverLink and LinkPreview.sys to handle keyboard shortcut
- dispatch CustomEvent OverLink from browser.js
- add/remove event listeners in sync with state of "browser.ml.linkPreview.enabled"
- update all_files_referenced to handle moz-src
Differential Revision: https://phabricator.services.mozilla.com/D239535
- alt+hover to trigger LinkPreview
- add LinkPreview.sys.mjs modules
- disable browser.ml.linkPreview.enabled by default
- use setOverLink and LinkPreview.sys to handle keyboard shortcut
- dispatch CustomEvent OverLink from browser.js
- add/remove event listeners in sync with state of "browser.ml.linkPreview.enabled"
- update all_files_referenced to handle moz-src
Differential Revision: https://phabricator.services.mozilla.com/D239535
- alt+hover to trigger LinkPreview
- add LinkPreview.sys.mjs modules
- disable browser.ml.linkPreview.enabled by default
- use setOverLink and LinkPreview.sys to handle keyboard shortcut
- dispatch CustomEvent OverLink from browser.js
- add/remove event listeners in sync with state of "browser.ml.linkPreview.enabled"
- update all_files_referenced to handle moz-src
Differential Revision: https://phabricator.services.mozilla.com/D239535