Files
tubestation/browser/base/content/browser-box.inc.xhtml
Greg Stoll 036a0bca8e Bug 1955250 - make Content Analysis able to display tab-modal dialogs in sidebar r=dlp-reviewers,desktop-theme-reviewers,reusable-components-reviewers,sidebar-reviewers,mstriemer,emz,handyman,nika,jsudiaman,emilio
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
2025-05-17 15:32:35 +00:00

32 lines
1.7 KiB
HTML

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<hbox flex="1" id="browser">
<box context="sidebar-context-menu" id="sidebar-main" hidden="true">
<html:sidebar-main flex="1">
<box id="vertical-tabs" slot="tabstrip" customizable="true" contextmenu="toolbar-context-menu"></box>
</html:sidebar-main>
</box>
<splitter id="sidebar-launcher-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
<vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
<box id="sidebar-header" align="center">
<toolbarbutton id="sidebar-switcher-target" class="tabbable" aria-expanded="false">
<image id="sidebar-icon" consumeanchor="sidebar-switcher-target"/>
<label id="sidebar-title" crop="end" control="sidebar"/>
<image id="sidebar-switcher-arrow"/>
</toolbarbutton>
<image id="sidebar-throbber"/>
<spacer id="sidebar-spacer"/>
<toolbarbutton id="sidebar-close" class="close-icon tabbable" data-l10n-id="sidebar-close-button"/>
</box>
<stack class="sidebar-browser-stack">
<browser id="sidebar" autoscroll="false" disablehistory="true" disablefullscreen="true" tooltip="aHTMLTooltip"/>
</stack>
</vbox>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
<tabbox id="tabbrowser-tabbox" flex="1" tabcontainer="tabbrowser-tabs">
<tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/>
</tabbox>
</hbox>