Bug 1584311 - Remove XUL grid from pluginPrefs.xul and make it an HTML page. r=mstriemer

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

--HG--
rename : toolkit/mozapps/extensions/content/pluginPrefs.xul => toolkit/mozapps/extensions/content/pluginPrefs.xhtml
extra : moz-landing-system : lando
This commit is contained in:
Tim Nguyen 2019-12-10 22:50:48 +00:00
Родитель 4ddcc15958
Коммит 17e5df2a0f
6 изменённых файлов: 78 добавлений и 98 удалений

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

@ -39,9 +39,9 @@ async function renderPluginMetadata(id) {
}
typeLabel.textContent = types.join(",\n");
let showProtectedModePref = canDisableFlashProtectedMode(plugin);
document
.getElementById("pluginEnableProtectedMode")
.setAttribute("collapsed", showProtectedModePref ? "" : "true");
document.getElementById(
"pluginEnableProtectedMode"
).hidden = !showProtectedModePref;
// Disable flash blocking when Fission is enabled (See Bug 1584931).
document.getElementById(
@ -66,7 +66,7 @@ function init() {
let checkbox = document.getElementById(id);
var prefVal = Services.prefs.getBoolPref(PREFS[id].pref);
checkbox.checked = PREFS[id].invert ? !prefVal : prefVal;
checkbox.addEventListener("command", () => {
checkbox.addEventListener("change", () => {
Services.prefs.setBoolPref(
PREFS[id].pref,
PREFS[id].invert ? !checkbox.checked : checkbox.checked

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

@ -0,0 +1,72 @@
<!-- 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 html [
<!ENTITY % pluginsDTD SYSTEM "chrome://pluginproblem/locale/pluginproblem.dtd">
%pluginsDTD;
<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
%extensionsDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="chrome://global/skin/global.css"/>
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css"/>
<style>
:root {
background-color: var(--in-content-box-background);
}
#detail-grid {
display: grid;
grid-template-columns: auto auto;
column-gap: 1em;
min-height: 250px;
align-content: start;
}
.detail-row:not([hidden]) {
display: grid;
grid-column: span 2;
grid-template-columns: subgrid;
padding-block: 16px;
line-height: 20px;
}
.detail-row:not([hidden]) ~ .detail-row {
border-top: 1px solid var(--in-content-box-border-color);
}
#pluginFlashBlocking label,
#pluginEnableProtectedMode label {
display: block;
}
</style>
<script src="chrome://mozapps/content/extensions/pluginPrefs.js"></script>
</head>
<body id="detail-grid">
<div class="detail-row">
<label>&plugin.file;</label>
<label class="text-list" id="pluginLibraries"/>
</div>
<div class="detail-row">
<label>&plugin.mimeTypes;</label>
<label class="text-list" id="pluginMimeTypes"/>
</div>
<div id="pluginFlashBlocking" class="detail-row">
<div>
<label>&plugin.enableBlocklists.label;</label>
<a href="https://support.mozilla.org/kb/flash-blocklists" target="_blank">&setting.learnmore;</a>
</div>
<input type="checkbox" id="pluginFlashBlockingCheckbox"/>
</div>
<div id="pluginEnableProtectedMode" class="detail-row">
<div>
<label>&plugin.flashProtectedMode.label;</label>
<a href="https://support.mozilla.org/kb/flash-protected-mode-settings" target="_blank">&setting.learnmore;</a>
</div>
<input type="checkbox" id="pluginEnableProtectedModeCheckbox"/>
</div>
</body>
</html>

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

@ -1,58 +0,0 @@
<?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/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/content/extensions/extensions.css"?>
<?xml-stylesheet href="chrome://mozapps/skin/extensions/extensions.css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % pluginsDTD SYSTEM "chrome://pluginproblem/locale/pluginproblem.dtd">
%pluginsDTD;
<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
%extensionsDTD;
]>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="chrome://mozapps/content/extensions/pluginPrefs.js"/>
<vbox class="detail-view-container">
<grid id="detail-grid">
<columns>
<column flex="1"/>
<column flex="2"/>
</columns>
<rows id="detail-rows">
<row class="detail-row-complex">
<label>&plugin.file;</label>
<label class="text-list" id="pluginLibraries"/>
</row>
<row class="detail-row-complex">
<label>&plugin.mimeTypes;</label>
<label class="text-list" id="pluginMimeTypes"/>
</row>
<row id="pluginFlashBlocking" class="detail-row-complex">
<vbox>
<label>&plugin.enableBlocklists.label;</label>
<label class="preferences-learnmore" is="text-link"
href="https://support.mozilla.org/kb/flash-blocklists">&setting.learnmore;</label>
</vbox>
<checkbox id="pluginFlashBlockingCheckbox"/>
</row>
<row id="pluginEnableProtectedMode" class="detail-row-complex">
<vbox>
<label>&plugin.flashProtectedMode.label;</label>
<label class="preferences-learnmore" is="text-link"
href="https://support.mozilla.org/kb/flash-protected-mode-settings">&setting.learnmore;</label>
</vbox>
<checkbox id="pluginEnableProtectedModeCheckbox"/>
</row>
</rows>
</grid>
</vbox>
</window>

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

@ -505,7 +505,7 @@ PluginWrapper.prototype = {
get optionsURL() {
return (
"chrome://mozapps/content/extensions/pluginPrefs.xul#id=" +
"chrome://mozapps/content/extensions/pluginPrefs.xhtml#id=" +
encodeURIComponent(this.id)
);
},

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

@ -10,7 +10,7 @@ toolkit.jar:
content/mozapps/extensions/extensions.js (content/extensions.js)
content/mozapps/extensions/blocklist.xul (content/blocklist.xul)
content/mozapps/extensions/blocklist.js (content/blocklist.js)
content/mozapps/extensions/pluginPrefs.xul (content/pluginPrefs.xul)
content/mozapps/extensions/pluginPrefs.xhtml (content/pluginPrefs.xhtml)
content/mozapps/extensions/pluginPrefs.js (content/pluginPrefs.js)
content/mozapps/extensions/OpenH264-license.txt (content/OpenH264-license.txt)
content/mozapps/extensions/aboutaddons.html (content/aboutaddons.html)

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

@ -775,28 +775,6 @@ button.warning {
margin-inline-end: 5px;
}
#detail-grid {
margin-bottom: 2em;
}
#detail-grid > columns > column:first-child {
min-width: 15em;
max-width: 25em;
}
.detail-row[first-row="true"],
.detail-row-complex[first-row="true"] {
border-top: none;
}
.detail-row,
.detail-row-complex {
border-top: 1px solid var(--in-content-box-border-color);
-moz-box-align: center;
min-height: 35px;
line-height: 20px;
}
.inline-options-browser {
margin-top: 2em;
}
@ -818,18 +796,6 @@ button.warning {
display: none;
}
.detail-row-footer {
padding-bottom: 6px;
}
.detail-row-footer > .preferences-description {
margin-inline-start: 6px;
margin-top: 0;
margin-bottom: 0;
/* card-width - card-padding - description-margins */
width: calc(664px - 32px - 11px);
color: var(--in-content-deemphasized-text);
}
/*** creator ***/