Bug 1703164 - Convert mail/components/downloads/content/aboutDownloads.xhtml to top level <html>. r=mkmelin DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D117516

--HG--
extra : rebase_source : 49dc4d49fd10504969a88fa6441a0c0c8c0ef93a
extra : amend_source : 0f8889effd4b2dbbc39bdc2e337f5e1920977c05
This commit is contained in:
Richard Marti 2021-06-15 17:04:01 +03:00
Родитель 9046371e9d
Коммит 26b33452ed
4 изменённых файлов: 65 добавлений и 47 удалений

Просмотреть файл

@ -19,6 +19,10 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/DownloadUtils.jsm"
);
window.addEventListener("load", event => {
DownloadsView.init();
});
var DownloadsView = {
init() {
window.controllers.insertControllerAt(0, this);

Просмотреть файл

@ -1,31 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/searchBox.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/themeableDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/downloads/aboutDownloads.css" type="text/css"?>
<!-- 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 [
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://messenger/skin/messenger.css"?>
<?xml-stylesheet href="chrome://global/skin/in-content/common.css"?>
<?xml-stylesheet href="chrome://messenger/skin/downloads/aboutDownloads.css"?>
<!DOCTYPE html [
<!ENTITY % aboutDownloadsDTD SYSTEM "chrome://messenger/locale/aboutDownloads.dtd">
%aboutDownloadsDTD;
]>
<window id="aboutDownloads"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
title="&aboutDownloads.title;"
csp="default-src chrome:; object-src 'none'; script-src chrome: 'unsafe-inline'"
lightweightthemes="true"
onload="DownloadsView.init();">
<xhtml:link rel="shortcut icon"
href="chrome://messenger/skin/downloads/download.svg"/>
<script src="chrome://global/content/globalOverlay.js"/>
<script src="chrome://global/content/editMenuOverlay.js"/>
<script src="chrome://messenger/content/downloads/aboutDownloads.js"/>
<html id="aboutDownloads" xmlns="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
scrolling="false"
lightweightthemes="true">
<head>
<title>&aboutDownloads.title;</title>
<script defer="defer" src="chrome://global/content/globalOverlay.js"></script>
<script defer="defer" src="chrome://global/content/editMenuOverlay.js"></script>
<script defer="defer" src="chrome://messenger/content/downloads/aboutDownloads.js"></script>
<meta http-equiv="Content-Security-Policy" content="default-src chrome:; object-src 'none'; script-src chrome: 'unsafe-inline'" />
<link rel="shortcut icon" href="chrome://messenger/skin/downloads/download.svg" />
</head>
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<commandset id="msgDownloadCommands"
commandupdater="true"
events="focus,select,contextmenu">
@ -96,4 +97,5 @@
accesskey="&cmd.clearList.accesskey;"
tooltiptext="&cmd.clearList.tooltip;"/>
</menupopup>
</window>
</html:body>
</html>

Просмотреть файл

@ -4,35 +4,51 @@
@namespace html url("http://www.w3.org/1999/xhtml");
#aboutDownloads {
background: transparent !important;
:root {
--in-content-button-border-radius: 3px;
--in-content-button-vertical-padding: 0;
--in-content-button-horizontal-padding: 12px;
}
@media not (prefers-contrast) {
:root {
--in-content-button-background: var(--grey-90-a10);
--in-content-button-background-hover: var(--grey-90-a20);
--in-content-button-background-active: var(--grey-90-a30);
}
@media (prefers-color-scheme: dark) {
:root {
--in-content-button-background: rgba(249, 249, 250, 0.1);
--in-content-button-background-hover: rgba(249, 249, 250, 0.15);
--in-content-button-background-active: rgba(249, 249, 250, 0.2);
--in-content-primary-button-background: #45a1ff;
--in-content-focus-outline-color: #45a1ff;
}
}
}
body {
color: var(--in-content-page-color);
background: var(--in-content-page-background);
text-shadow: none;
}
#downloadTopBox {
background-color: var(--toolbar-bgcolor);
background-image: var(--toolbar-bgimage);
color: -moz-DialogText;
padding: 10px 18px;
border-bottom: 1px solid var(--chrome-content-separator-color);
}
#downloadTopBox:-moz-lwtheme {
color: var(--lwt-text-color);
}
#downloadBottomBox {
padding: 15px 18px;
background-color: -moz-Dialog;
}
#downloadBottomBox:-moz-lwtheme {
text-shadow: none;
}
:root:not([lwtheme-image="true"]) #downloadBottomBox {
background-color: var(--toolbar-bgcolor);
}
#msgDownloadsListEmptyDescription {
display: none;
margin: 1em;
@ -48,8 +64,9 @@
/** The default listbox appearance comes with an unwanted margin. **/
appearance: none;
margin: 0;
border: 1px solid hsla(0, 0%, 50%, .3);
color: -moz-DialogText
color: inherit;
border: 1px solid var(--in-content-box-border-color);
background-color: var(--in-content-box-background);
}
:root[lwt-tree] #msgDownloadsRichListBox {
@ -59,6 +76,7 @@
#msgDownloadsRichListBox > .download {
min-height: 5em;
border-bottom: 1px solid hsla(0, 0%, 50%, .3);
border-radius: var(--in-content-button-border-radius);
}
#msgDownloadsRichListBox > .download > vbox {
@ -68,17 +86,12 @@
#clearDownloads {
margin-inline-start: 0;
font-weight: 400;
}
#searchBox {
width: 22em;
margin-inline-end: 0;
padding-inline-start: 5px;
}
#searchBox html|input {
border-style: none;
outline: none;
}
.fileTypeIcon {
@ -106,21 +119,20 @@
}
.downloadButton {
appearance: none;
-moz-box-align: center;
background: transparent !important;
min-width: 0;
min-height: 0;
height: unset;
margin: 0;
border: none !important;
outline: none !important;
color: inherit;
padding: 0 18px;
padding: 0 12px;
}
.downloadButton > .button-box {
appearance: none;
padding: 2px !important;
padding: 8px !important;
}
.downloadButton > .button-box > .button-icon {
@ -136,12 +148,11 @@
}
.downloadButton:hover > .button-box {
background-color: graytext;
color: Field;
background-color: var(--in-content-button-background-hover);
border-radius: 50%;
}
.downloadButton:hover:active > .button-box {
background-color: FieldText;
background-color: var(--in-content-button-background-active);
}

Просмотреть файл

@ -38,6 +38,7 @@
border-radius: 6px;
outline: 1px solid rgb(124,163,206);
outline-offset: -2px;
--in-content-button-text-color-hover: inherit;
}
}