We no longer have the parent/child window set-up for popups, so we can just use mWnd. Remove the HideWindowChrome() stuff. That landed once already in [1], but was backed out along with other stuff, due to it causing buttons to show up on non-native notifications (which is the only top level that hits this code-path). Eventually, I want to handle this more like other platforms (via D209502 and D207303) but until those land, just explicitly set hidechrome="true" on that window in order to be able to land this simplification separately. Bug 1454589 doesn't happen with this change, and there's no reason to apply size mode in SetWindowTranslucencyInner, so remove that chunk of code too. [1]: https://hg.mozilla.org/mozilla-central/rev/24dc60b32e21 Differential Revision: https://phabricator.services.mozilla.com/D218635
87 lines
2.5 KiB
HTML
87 lines
2.5 KiB
HTML
<?xml version="1.0"?>
|
|
<!-- 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/. -->
|
|
|
|
<!DOCTYPE window>
|
|
|
|
<window
|
|
id="alertNotification"
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
windowtype="alert:alert"
|
|
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
|
role="alert"
|
|
pack="start"
|
|
hidechrome="true"
|
|
onload="onAlertLoad();"
|
|
onclick="onAlertClick();"
|
|
onbeforeunload="onAlertBeforeUnload();"
|
|
>
|
|
<linkset>
|
|
<xhtml:link
|
|
rel="stylesheet"
|
|
href="chrome://global/content/alerts/alert.css"
|
|
/>
|
|
<xhtml:link rel="stylesheet" href="chrome://global/skin/alert.css" />
|
|
|
|
<xhtml:link rel="localization" href="toolkit/global/alert.ftl" />
|
|
</linkset>
|
|
|
|
<script src="chrome://global/content/alerts/alert.js" />
|
|
|
|
<vbox id="alertBox">
|
|
<box id="alertTitleBox">
|
|
<image id="alertIcon" />
|
|
<label id="alertTitleLabel" class="alertTitle" crop="end" />
|
|
<vbox>
|
|
<toolbarbutton
|
|
class="close-icon"
|
|
data-l10n-id="alert-close"
|
|
onclick="event.stopPropagation();"
|
|
oncommand="onAlertClose();"
|
|
/>
|
|
</vbox>
|
|
</box>
|
|
<box>
|
|
<hbox
|
|
id="alertImageBox"
|
|
class="alertImageBox"
|
|
align="center"
|
|
pack="center"
|
|
>
|
|
<image id="alertImage" />
|
|
</hbox>
|
|
|
|
<vbox id="alertTextBox" class="alertTextBox">
|
|
<label id="alertTextLabel" class="alertText" />
|
|
<spacer flex="1" />
|
|
<box id="alertFooter">
|
|
<label id="alertSourceLabel" class="alertSource" />
|
|
<button
|
|
type="menu"
|
|
id="alertSettings"
|
|
data-l10n-id="alert-settings-title"
|
|
>
|
|
<menupopup position="after_end">
|
|
<menuitem id="doNotDisturbMenuItem" oncommand="doNotDisturb();" />
|
|
<menuseparator />
|
|
<menuitem
|
|
id="disableForOriginMenuItem"
|
|
oncommand="disableForOrigin();"
|
|
/>
|
|
<menuitem id="openSettingsMenuItem" oncommand="openSettings();" />
|
|
</menupopup>
|
|
</button>
|
|
</box>
|
|
</vbox>
|
|
</box>
|
|
</vbox>
|
|
|
|
<!-- This method is called inline because we want to make sure we establish the width
|
|
and height of the alert before we fire the onload handler. -->
|
|
<script>
|
|
/* eslint-disable no-undef */
|
|
prefillAlertInfo();
|
|
</script>
|
|
</window>
|