Merge mozilla-central to inbound. a=merge CLOSED TREE

This commit is contained in:
Margareta Eliza Balazs 2018-04-12 12:46:52 +03:00
commit 1dff32311e
333 changed files with 5618 additions and 2267 deletions

View File

@ -7,8 +7,7 @@
onpopupshowing="if (event.target.parentNode.parentNode == this &&
!('@mozilla.org/widget/nativemenuservice;1' in Cc))
this.setAttribute('openedwithkey',
event.target.parentNode.openedWithKey);"
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
event.target.parentNode.openedWithKey);">
<menu id="file-menu" label="&fileMenu.label;"
accesskey="&fileMenu.accesskey;">
<menupopup id="menu_FilePopup"

View File

@ -1175,11 +1175,7 @@ BrowserPageActions.addSearchEngine = {
if (!this.engines.length) {
return;
}
let title =
this.engines.length == 1 ?
this.strings.formatStringFromName("searchAddFoundEngine",
[this.engines[0].title], 1) :
this.strings.GetStringFromName("searchAddFoundEngineMenu");
let title = this.strings.GetStringFromName("searchAddFoundEngine2");
this.action.setTitle(title, window);
this.action.setIconURL(this.engines[0].icon, window);
},
@ -1238,7 +1234,7 @@ BrowserPageActions.addSearchEngine = {
Services.search.addEngine(uri, null, image, false, {
onSuccess: engine => {
BrowserPageActionFeedback.show(this.action, {
text: this.strings.GetStringFromName("searchAddedFoundEngine"),
text: this.strings.GetStringFromName("searchAddedFoundEngine2"),
});
},
onError(errorCode) {

View File

@ -31,8 +31,7 @@ add_task(async function one() {
let actions = PageActions.actionsInPanel(window);
let action = actions.find(a => a.id == "addSearchEngine");
Assert.ok(action, "Action should be present in panel");
let expectedTitle =
"Add \u{201C}page_action_menu_add_search_engine_0\u{201D} to One-Click Search";
let expectedTitle = "Add Search Engine";
Assert.equal(action.getTitle(window), expectedTitle, "Action title");
let button =
BrowserPageActions.panelButtonNodeForActionID("addSearchEngine");
@ -50,7 +49,7 @@ add_task(async function one() {
await hiddenPromise;
let engine = await enginePromise;
let feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown");
Assert.equal(feedbackText, "Added Search Engine");
// Open the panel again.
await promisePageActionPanelOpen();
@ -100,7 +99,7 @@ add_task(async function many() {
let actions = PageActions.actionsInPanel(window);
let action = actions.find(a => a.id == "addSearchEngine");
Assert.ok(action, "Action should be present in panel");
let expectedTitle = "Add One-Click Search Engine";
let expectedTitle = "Add Search Engine";
Assert.equal(action.getTitle(window), expectedTitle, "Action title");
let button =
BrowserPageActions.panelButtonNodeForActionID("addSearchEngine");
@ -139,7 +138,7 @@ add_task(async function many() {
let engine = await enginePromise;
engines.push(engine);
let feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown", "Feedback text");
Assert.equal(feedbackText, "Added Search Engine", "Feedback text");
// Open the panel and show the subview again. The installed engine should
// be gone.
@ -166,7 +165,7 @@ add_task(async function many() {
engine = await enginePromise;
engines.push(engine);
feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown", "Feedback text");
Assert.equal(feedbackText, "Added Search Engine", "Feedback text");
// Open the panel again. This time the action button should show the one
// remaining engine.
@ -174,8 +173,7 @@ add_task(async function many() {
actions = PageActions.actionsInPanel(window);
action = actions.find(a => a.id == "addSearchEngine");
Assert.ok(action, "Action should be present in panel");
expectedTitle =
"Add \u{201C}page_action_menu_add_search_engine_2\u{201D} to One-Click Search";
expectedTitle = "Add Search Engine";
Assert.equal(action.getTitle(window), expectedTitle, "Action title");
button = BrowserPageActions.panelButtonNodeForActionID("addSearchEngine");
Assert.ok(button, "Button should be present in panel");
@ -193,7 +191,7 @@ add_task(async function many() {
engine = await enginePromise;
engines.push(engine);
feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown", "Feedback text");
Assert.equal(feedbackText, "Added Search Engine", "Feedback text");
// All engines are installed at this point. Open the panel and make sure
// the action is gone.
@ -220,8 +218,7 @@ add_task(async function many() {
actions = PageActions.actionsInPanel(window);
action = actions.find(a => a.id == "addSearchEngine");
Assert.ok(action, "Action should be present in panel");
expectedTitle =
"Add \u{201C}page_action_menu_add_search_engine_0\u{201D} to One-Click Search";
expectedTitle = "Add Search Engine";
Assert.equal(action.getTitle(window), expectedTitle, "Action title");
button = BrowserPageActions.panelButtonNodeForActionID("addSearchEngine");
Assert.ok(button, "Button should be present in panel");
@ -241,7 +238,7 @@ add_task(async function many() {
actions = PageActions.actionsInPanel(window);
action = actions.find(a => a.id == "addSearchEngine");
Assert.ok(action, "Action should be present in panel");
expectedTitle = "Add One-Click Search Engine";
expectedTitle = "Add Search Engine";
Assert.equal(action.getTitle(window), expectedTitle, "Action title");
button = BrowserPageActions.panelButtonNodeForActionID("addSearchEngine");
Assert.ok(button, "Button should be in panel");
@ -313,7 +310,7 @@ add_task(async function urlbarOne() {
EventUtils.synthesizeMouseAtCenter(button, {});
let engine = await enginePromise;
let feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown");
Assert.equal(feedbackText, "Added Search Engine");
// The action should be gone.
actions = PageActions.actionsInUrlbar(window);
@ -392,7 +389,7 @@ add_task(async function urlbarMany() {
let engine = await enginePromise;
engines.push(engine);
let feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown", "Feedback text");
Assert.equal(feedbackText, "Added Search Engine", "Feedback text");
// Open the panel again. The installed engine should be gone.
EventUtils.synthesizeMouseAtCenter(button, {});
@ -418,7 +415,7 @@ add_task(async function urlbarMany() {
engine = await enginePromise;
engines.push(engine);
feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown", "Feedback text");
Assert.equal(feedbackText, "Added Search Engine", "Feedback text");
// Now there's only one engine left, so clicking the button should simply
// install it instead of opening the activated-action panel.
@ -429,7 +426,7 @@ add_task(async function urlbarMany() {
engine = await enginePromise;
engines.push(engine);
feedbackText = await feedbackPromise;
Assert.equal(feedbackText, "Added to Search Dropdown", "Feedback text");
Assert.equal(feedbackText, "Added Search Engine", "Feedback text");
// All engines are installed at this point. The action should be gone.
actions = PageActions.actionsInUrlbar(window);

View File

@ -11,7 +11,7 @@ function loadExtension() {
manifest: {
"content_scripts": [{
"js": ["script.js"],
"matches": ["http://mochi.test/"],
"matches": ["http://mochi.test/?discoTest"],
}],
},
background() {
@ -21,7 +21,7 @@ function loadExtension() {
browser.test.sendMessage("port_disconnected");
});
port.onMessage.addListener(async msg => {
browser.test.assertEq("connect_from_contentscript", msg, "expected message");
browser.test.assertEq("connect_from_script", msg, "expected message");
// Move a tab to a new window and back. Regression test for bugzil.la/1448674
let {windowId, id: tabId, index} = port.sender.tab;
await browser.windows.create({tabId});
@ -65,7 +65,7 @@ function loadExtension() {
});
browser.runtime.sendMessage("disconnect-me");
});
port.postMessage("connect_from_contentscript");
port.postMessage("connect_from_script");
},
},
});
@ -74,7 +74,7 @@ function loadExtension() {
add_task(async function contentscript_connect_and_move_tabs() {
let extension = loadExtension();
await extension.startup();
await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/");
await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/?discoTest");
await extension.awaitMessage("port_ping_ponged_before_disconnect");
await extension.awaitMessage("port_disconnected");
// Must use gBrowser.selectedTab instead of the return value of

View File

@ -12,19 +12,19 @@ var gAppManagerDialog = {
Services.scriptloader.loadSubScript("chrome://browser/content/preferences/in-content/main.js",
window);
var pane = gMainPane;
var bundle = document.getElementById("appManagerBundle");
var contentText;
if (this.handlerInfo.type == TYPE_MAYBE_FEED)
contentText = bundle.getString("handleWebFeeds");
else {
var description = pane._describeType(this.handlerInfo);
var key =
(this.handlerInfo.wrappedHandlerInfo instanceof Ci.nsIMIMEInfo) ? "handleFile"
: "handleProtocol";
contentText = bundle.getFormattedString(key, [description]);
const appDescElem = document.getElementById("appDescription");
if (this.handlerInfo.type == TYPE_MAYBE_FEED) {
document.l10n.setAttributes(appDescElem, "app-manager-handle-webfeeds");
} else if (this.handlerInfo.wrappedHandlerInfo instanceof Ci.nsIMIMEInfo) {
document.l10n.setAttributes(appDescElem, "app-manager-handle-file", {
type: pane._describeType(this.handlerInfo)
});
} else {
document.l10n.setAttributes(appDescElem, "app-manager-handle-protocol", {
type: pane._describeType(this.handlerInfo)
});
}
contentText = bundle.getFormattedString("descriptionApplications", [contentText]);
document.getElementById("appDescription").textContent = contentText;
var list = document.getElementById("appList");
var apps = this.handlerInfo.possibleApplicationHandlers.enumerate();
@ -92,9 +92,9 @@ var gAppManagerDialog = {
else if (app instanceof Ci.nsIWebContentHandlerInfo)
address = app.uri;
document.getElementById("appLocation").value = address;
var bundle = document.getElementById("appManagerBundle");
var appType = app instanceof Ci.nsILocalHandlerApp ? "descriptionLocalApp"
: "descriptionWebApp";
document.getElementById("appType").value = bundle.getString(appType);
const l10nId = app instanceof Ci.nsILocalHandlerApp ? "app-manager-local-app-info"
: "app-manager-web-app-info";
const appTypeElem = document.getElementById("appType");
document.l10n.setAttributes(appTypeElem, l10nId);
}
};

View File

@ -5,18 +5,19 @@
<?xml-stylesheet href="chrome://global/skin/"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/applicationManager.dtd">
<dialog id="appManager"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons="accept,cancel"
onload="gAppManagerDialog.init();"
ondialogaccept="gAppManagerDialog.onOK();"
ondialogcancel="gAppManagerDialog.onCancel();"
title="&appManager.title;"
style="&appManager.style;"
data-l10n-id="app-manager-window"
data-l10n-attrs="title, style"
persist="screenX screenY">
<link rel="localization" href="browser/preferences/applicationManager.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script type="application/javascript"
src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript"
@ -34,26 +35,22 @@
<key id="delete" keycode="VK_DELETE" command="cmd_remove"/>
</keyset>
<stringbundleset id="appManagerBundleset">
<stringbundle id="appManagerBundle"
src="chrome://browser/locale/preferences/applicationManager.properties"/>
</stringbundleset>
<description id="appDescription"/>
<!-- The &#160; character is required here to calculate the dialog height -->
<description id="appDescription">&#160;</description>
<separator class="thin"/>
<hbox flex="1">
<listbox id="appList" onselect="gAppManagerDialog.onSelect();" flex="1"/>
<vbox>
<button id="remove"
label="&remove.label;"
accesskey="&remove.accesskey;"
data-l10n-id="app-manager-remove"
command="cmd_remove"/>
<spacer flex="1"/>
</vbox>
</hbox>
<vbox id="appDetails">
<separator class="thin"/>
<label id="appType"/>
<!-- The &#160; character is required here to calculate the dialog height -->
<label id="appType">&#160;</label>
<textbox id="appLocation" readonly="true" class="plain"/>
</vbox>
</dialog>

View File

@ -12,7 +12,6 @@ const LISTS_PREF_BRANCH = "browser.safebrowsing.provider.mozilla.lists.";
var gBlocklistManager = {
_type: "",
_blockLists: [],
_brandShortName: null,
_bundle: null,
_tree: null,
@ -75,15 +74,6 @@ var gBlocklistManager = {
}
this._type = "tracking";
this._brandShortName = params.brandShortName;
let blocklistsText = document.getElementById("blocklistsText");
while (blocklistsText.hasChildNodes()) {
blocklistsText.firstChild.remove();
}
blocklistsText.appendChild(document.createTextNode(params.introText));
document.title = params.windowTitle;
this._loadBlockLists();
},

View File

@ -7,18 +7,20 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/blocklists.dtd" >
<window id="BlocklistsDialog" class="windowDialog"
windowtype="Browser:Blocklists"
title="&window.title;"
data-l10n-id="blocklist-window"
data-l10n-attrs="title, style"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"
onload="gBlocklistManager.onLoad();"
onunload="gBlocklistManager.uninit();"
persist="screenX screenY width height"
onkeypress="gBlocklistManager.onWindowKeyPress(event);">
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/preferences/blocklists.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script src="chrome://global/content/treeUtils.js"/>
<script src="chrome://browser/content/preferences/blocklists.js"/>
@ -26,11 +28,11 @@
src="chrome://browser/locale/preferences/preferences.properties"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
<key data-l10n-id="blocklist-close-key" modifiers="accel" oncommand="window.close();"/>
</keyset>
<vbox class="contentPane largeDialogContainer" flex="1">
<description id="blocklistsText" control="url"/>
<description id="blocklistsText" data-l10n-id="blocklist-desc" control="url"/>
<separator class="thin"/>
<tree id="blocklistsTree" flex="1" style="height: 18em;"
hidecolumnpicker="true"
@ -38,7 +40,7 @@
<treecols>
<treecol id="selectionCol" label="" flex="1" sortable="false"
type="checkbox"/>
<treecol id="listCol" label="&treehead.list.label;" flex="80"
<treecol id="listCol" data-l10n-id="blocklist-treehead-list" flex="80"
sortable="false"/>
</treecols>
<treechildren/>
@ -48,9 +50,9 @@
<spacer flex="1"/>
<hbox class="actionButtons" align="right" flex="1">
<button oncommand="close();" icon="close"
label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
data-l10n-id="blocklist-button-cancel"/>
<button id="btnApplyChanges" oncommand="gBlocklistManager.onApplyChanges();" icon="save"
label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
data-l10n-id="blocklist-button-ok"/>
</hbox>
</vbox>
</window>

View File

@ -8,47 +8,48 @@
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/preferences/clearSiteData.css" type="text/css"?>
<!DOCTYPE dialog [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % clearSiteDataDTD SYSTEM "chrome://browser/locale/preferences/clearSiteData.dtd">
%brandDTD;
%clearSiteDataDTD;
]>
<window id="ClearSiteDataDialog" class="windowDialog"
windowtype="Browser:ClearSiteData"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"
title="&window.title;"
data-l10n-id="clear-site-data-window"
data-l10n-attrs="title, style"
persist="screenX screenY width height">
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script src="chrome://browser/content/preferences/clearSiteData.js"/>
<stringbundle id="bundlePreferences"
src="chrome://browser/locale/preferences/preferences.properties"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
<key data-l10n-id="clear-site-data-close-key" modifiers="accel" oncommand="window.close();"/>
</keyset>
<vbox class="contentPane largeDialogContainer" flex="1">
<description control="url">&window.description;</description>
<description control="url" data-l10n-id="clear-site-data-description"/>
<separator class="thin"/>
<vbox class="options-container">
<hbox class="option">
<checkbox id="clearSiteData" checked="true"
accesskey="&clearSiteData.accesskey;" />
<checkbox id="clearSiteData" checked="true" />
<vbox>
<label for="clearSiteData" id="clearSiteDataLabel" value="&clearSiteData.label;" />
<description class="option-description">&clearSiteData.description;</description>
<label for="clearSiteData"
id="clearSiteDataLabel"
control="clearSiteData"
data-l10n-id="clear-site-data-cookies" />
<description class="option-description" data-l10n-id="clear-site-data-cookies-info" />
</vbox>
</hbox>
<hbox class="option">
<checkbox id="clearCache" checked="true"
accesskey="&clearCache.accesskey;" />
<checkbox id="clearCache" checked="true" />
<vbox>
<label for="clearCache" id="clearCacheLabel" value="&clearCache.label;" />
<description class="option-description">&clearCache.description;</description>
<label for="clearCache"
id="clearCacheLabel"
control="clearCache"
data-l10n-id="clear-site-data-cache" />
<description class="option-description" data-l10n-id="clear-site-data-cache-info"/>
</vbox>
</hbox>
</vbox>
@ -56,9 +57,9 @@
<vbox>
<hbox class="actionButtons" align="right" flex="1">
<button id="cancelButton" icon="close"
label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
data-l10n-id="clear-site-data-cancel" />
<button id="clearButton" icon="save"
label="&button.clear.label;" accesskey="&button.clear.accesskey;"/>
data-l10n-id="clear-site-data-clear" />
</hbox>
</vbox>
</window>

View File

@ -8,32 +8,24 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<!DOCTYPE dialog [
<!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
%preferencesDTD;
<!ENTITY % colorsDTD SYSTEM "chrome://browser/locale/preferences/colors.dtd">
%colorsDTD;
]>
<dialog id="ColorsDialog" type="child" class="prefwindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&colorsDialog.title;"
data-l10n-id="colors-window"
data-l10n-attrs="title, style"
buttons="accept,cancel,help"
persist="lastSelected screenX screenY"
role="dialog"
helpTopic="prefs-fonts-and-colors"
ondialoghelp="openPrefsHelp()"
#ifdef XP_MACOSX
style="width: &window.macWidth; !important;">
#else
style="width: &window.width; !important;">
#endif
ondialoghelp="openPrefsHelp()">
<link rel="localization" href="browser/preferences/colors.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="Preferences.close(event)"/>
<key data-l10n-id="colors-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
</keyset>
<vbox id="ColorsDialogPane" class="prefpane">
@ -42,43 +34,43 @@
<hbox>
<groupbox flex="1">
<caption><label>&color;</label></caption>
<caption><label data-l10n-id="colors-text-and-background"/></caption>
<hbox align="center">
<label accesskey="&textColor2.accesskey;" control="foregroundtextmenu">&textColor2.label;</label>
<label data-l10n-id="colors-text-header" control="foregroundtextmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="foregroundtextmenu" palettename="standard"
preference="browser.display.foreground_color"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label accesskey="&backgroundColor2.accesskey;" control="backgroundmenu">&backgroundColor2.label;</label>
<label data-l10n-id="colors-background" control="backgroundmenu" />
<spacer flex="1"/>
<colorpicker type="button" id="backgroundmenu" palettename="standard"
preference="browser.display.background_color"/>
</hbox>
<separator class="thin"/>
<hbox align="center">
<checkbox id="browserUseSystemColors" label="&useSystemColors.label;" accesskey="&useSystemColors.accesskey;"
<checkbox id="browserUseSystemColors" data-l10n-id="colors-use-system"
preference="browser.display.use_system_colors"/>
</hbox>
</groupbox>
<groupbox flex="1">
<caption><label>&links;</label></caption>
<caption><label data-l10n-id="colors-links-header"/></caption>
<hbox align="center">
<label accesskey="&linkColor2.accesskey;" control="unvisitedlinkmenu">&linkColor2.label;</label>
<label data-l10n-id="colors-unvisited-links" control="unvisitedlinkmenu" />
<spacer flex="1"/>
<colorpicker type="button" id="unvisitedlinkmenu" palettename="standard"
preference="browser.anchor_color"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label accesskey="&visitedLinkColor2.accesskey;" control="visitedlinkmenu">&visitedLinkColor2.label;</label>
<label data-l10n-id="colors-visited-links" control="visitedlinkmenu" />
<spacer flex="1"/>
<colorpicker type="button" id="visitedlinkmenu" palettename="standard"
preference="browser.visited_color"/>
</hbox>
<separator class="thin"/>
<hbox align="center">
<checkbox id="browserUnderlineAnchors" label="&underlineLinks.label;" accesskey="&underlineLinks.accesskey;"
<checkbox id="browserUnderlineAnchors" data-l10n-id="colors-underline-links"
preference="browser.underline_anchors"/>
</hbox>
</groupbox>
@ -88,16 +80,15 @@
#else
<vbox>
#endif
<label accesskey="&overrideDefaultPageColors2.accesskey;"
control="useDocumentColors">&overrideDefaultPageColors2.label;</label>
<label data-l10n-id="colors-page-override" control="useDocumentColors" />
<hbox>
<menulist id="useDocumentColors" preference="browser.display.document_color_use" flex="1">
<menupopup>
<menuitem label="&overrideDefaultPageColors.always.label;"
<menuitem data-l10n-id="colors-page-override-option-always"
value="2" id="documentColorAlways"/>
<menuitem label="&overrideDefaultPageColors.auto.label;"
<menuitem data-l10n-id="colors-page-override-option-auto"
value="0" id="documentColorAutomatic"/>
<menuitem label="&overrideDefaultPageColors.never.label;"
<menuitem data-l10n-id="colors-page-override-option-never"
value="1" id="documentColorNever"/>
</menupopup>
</menulist>

View File

@ -4,41 +4,30 @@
- 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 dialog [
<!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
%preferencesDTD;
<!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd">
%connectionDTD;
<!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
%mainDTD;
]>
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<dialog id="ConnectionsDialog" type="child" class="prefwindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&connectionsDialog.title;"
data-l10n-id="connection-window"
data-l10n-attrs="title, style"
buttons="accept,cancel,help"
persist="lastSelected screenX screenY"
role="dialog"
onbeforeaccept="return gConnectionsDialog.beforeAccept();"
onload="gConnectionsDialog.checkForSystemProxy();"
helpTopic="prefs-connection-settings"
ondialoghelp="openPrefsHelp()"
ondialoghelp="openPrefsHelp()">
#ifdef XP_MACOSX
style="width: &window.macWidth2; !important;">
#else
style="width: &window.width2; !important;">
#endif
<link rel="localization" href="browser/preferences/connection.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
<script type="application/javascript" src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="Preferences.close(event)"/>
<key data-l10n-id="connection-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
</keyset>
<vbox id="ConnectionsDialogPane" class="prefpane largeDialogContainer">
@ -51,18 +40,18 @@
<description control="disableProxyExtension" flex="1" />
<button id="disableProxyExtension"
class="extension-controlled-button accessory-button"
label="&disableExtension.label;" />
data-l10n-id="connection-disable-extension" />
</hbox>
<groupbox>
<caption><label>&proxyTitle.label2;</label></caption>
<caption><label data-l10n-id="connection-proxy-configure" /></caption>
<radiogroup id="networkProxyType" preference="network.proxy.type"
onsyncfrompreference="return gConnectionsDialog.readProxyType();">
<radio value="0" label="&noProxyTypeRadio.label;" accesskey="&noProxyTypeRadio.accesskey;"/>
<radio value="4" label="&WPADTypeRadio.label;" accesskey="&WPADTypeRadio.accesskey;"/>
<radio value="5" label="&systemTypeRadio.label;" accesskey="&systemTypeRadio.accesskey;" id="systemPref" hidden="true"/>
<radio value="1" label="&manualTypeRadio2.label;" accesskey="&manualTypeRadio2.accesskey;"/>
<radio value="0" data-l10n-id="connection-proxy-option-no" />
<radio value="4" data-l10n-id="connection-proxy-option-system" />
<radio value="5" data-l10n-id="connection-proxy-option-auto" id="systemPref" hidden="true" />
<radio value="1" data-l10n-id="connection-proxy-option-manual"/>
<grid class="indent" flex="1">
<columns>
<column/>
@ -71,12 +60,12 @@
<rows>
<row align="center">
<hbox pack="end">
<label accesskey="&http2.accesskey;" control="networkProxyHTTP">&http2.label;</label>
<label data-l10n-id="connection-proxy-http" control="networkProxyHTTP" />
</hbox>
<hbox align="center">
<textbox id="networkProxyHTTP" flex="1"
preference="network.proxy.http" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyServer();"/>
<label accesskey="&HTTPport.accesskey;" control="networkProxyHTTP_Port">&port2.label;</label>
<label data-l10n-id="connection-proxy-http-port" control="networkProxyHTTP_Port" />
<textbox id="networkProxyHTTP_Port" class="proxy-port-input" type="number" max="65535" hidespinbuttons="true"
preference="network.proxy.http_port" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyPort();"/>
</hbox>
@ -84,43 +73,43 @@
<row>
<hbox/>
<hbox>
<checkbox id="shareAllProxies" label="&shareproxy.label;" accesskey="&shareproxy.accesskey;"
<checkbox id="shareAllProxies" data-l10n-id="connection-proxy-http-share"
preference="network.proxy.share_proxy_settings"
onsyncfrompreference="return gConnectionsDialog.updateProtocolPrefs();"/>
</hbox>
</row>
<row align="center">
<hbox pack="end">
<label accesskey="&ssl2.accesskey;" control="networkProxySSL">&ssl2.label;</label>
<label data-l10n-id="connection-proxy-ssl" control="networkProxySSL"/>
</hbox>
<hbox align="center">
<textbox id="networkProxySSL" flex="1" preference="network.proxy.ssl"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', false);"/>
<label accesskey="&SSLport.accesskey;" control="networkProxySSL_Port">&port2.label;</label>
<label data-l10n-id="connection-proxy-ssl-port" control="networkProxySSL_Port" />
<textbox id="networkProxySSL_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ssl_port"
hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', true);"/>
</hbox>
</row>
<row align="center">
<hbox pack="end">
<label accesskey="&ftp2.accesskey;" control="networkProxyFTP">&ftp2.label;</label>
<label data-l10n-id="connection-proxy-ftp" control="networkProxyFTP"/>
</hbox>
<hbox align="center">
<textbox id="networkProxyFTP" flex="1" preference="network.proxy.ftp"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', false);"/>
<label accesskey="&FTPport.accesskey;" control="networkProxyFTP_Port">&port2.label;</label>
<label data-l10n-id="connection-proxy-ftp-port" control="networkProxyFTP_Port"/>
<textbox id="networkProxyFTP_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ftp_port"
hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', true);"/>
</hbox>
</row>
<row align="center">
<hbox pack="end">
<label accesskey="&socks2.accesskey;" control="networkProxySOCKS">&socks2.label;</label>
<label data-l10n-id="connection-proxy-socks" control="networkProxySOCKS"/>
</hbox>
<hbox align="center">
<textbox id="networkProxySOCKS" flex="1" preference="network.proxy.socks"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', false);"/>
<label accesskey="&SOCKSport.accesskey;" control="networkProxySOCKS_Port">&port2.label;</label>
<label data-l10n-id="connection-proxy-socks-port" control="networkProxySOCKS_Port"/>
<textbox id="networkProxySOCKS_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.socks_port"
hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', true);"/>
</hbox>
@ -130,22 +119,22 @@
<box pack="start">
<radiogroup id="networkProxySOCKSVersion" orient="horizontal"
preference="network.proxy.socks_version">
<radio id="networkProxySOCKSVersion4" value="4" label="&socks4.label;" accesskey="&socks4.accesskey;" />
<radio id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;" />
<radio id="networkProxySOCKSVersion4" value="4" data-l10n-id="connection-proxy-socks4" />
<radio id="networkProxySOCKSVersion5" value="5" data-l10n-id="connection-proxy-socks5" />
</radiogroup>
</box>
</row>
<label accesskey="&noproxy2.accesskey;" control="networkProxyNone">&noproxy2.label;</label>
<label data-l10n-id="connection-proxy-noproxy" control="networkProxyNone"/>
<textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
<label control="networkProxyNone">&noproxyExplain.label;</label>
<label control="networkProxyNone" data-l10n-id="connection-proxy-noproxy-desc" />
</rows>
</grid>
<radio value="2" label="&autoTypeRadio2.label;" accesskey="&autoTypeRadio2.accesskey;"/>
<radio value="2" data-l10n-id="connection-proxy-autotype" />
<hbox class="indent" flex="1" align="center">
<textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url"
oninput="gConnectionsDialog.updateReloadButton();"/>
<button id="autoReload" icon="refresh"
label="&reload.label;" accesskey="&reload.accesskey;"
data-l10n-id="connection-proxy-reload"
oncommand="gConnectionsDialog.reloadPAC();"
preference="pref.advanced.proxies.disable_button.reload"/>
</hbox>
@ -153,11 +142,11 @@
</groupbox>
<separator class="thin"/>
<checkbox id="autologinProxy"
label="&autologinproxy.label;"
accesskey="&autologinproxy.accesskey;"
preference="signon.autologin.proxy"
tooltiptext="&autologinproxy.tooltip;"/>
<checkbox id="networkProxySOCKSRemoteDNS" preference="network.proxy.socks_remote_dns" label="&socksRemoteDNS.label2;" accesskey="&socksRemoteDNS.accesskey;" />
data-l10n-id="connection-proxy-autologin"
preference="signon.autologin.proxy" />
<checkbox id="networkProxySOCKSRemoteDNS"
preference="network.proxy.socks_remote_dns"
data-l10n-id="connection-proxy-socks-remote-dns" />
<separator/>
</vbox>
</dialog>

View File

@ -8,16 +8,10 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<!DOCTYPE dialog [
<!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
%preferencesDTD;
<!ENTITY % fontsDTD SYSTEM "chrome://browser/locale/preferences/fonts.dtd">
%fontsDTD;
]>
<dialog id="FontsDialog" type="child" class="prefwindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&fontsDialog.title;"
data-l10n-id="fonts-window"
data-l10n-attrs="title"
buttons="accept,cancel,help"
persist="lastSelected screenX screenY"
role="dialog"
@ -25,11 +19,14 @@
ondialoghelp="openPrefsHelp()"
onbeforeaccept="return gFontsDialog.onBeforeAccept();">
<link rel="localization" href="browser/preferences/fonts.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="Preferences.close(event)"/>
<key data-l10n-id="fonts-window-close" modifiers="accel" oncommand="Preferences.close(event)"/>
</keyset>
<vbox id="FontsDialogPane" class="prefpane largeDialogContainer">
@ -42,42 +39,42 @@
<groupbox>
<caption>
<hbox align="center">
<label accesskey="&fonts.accesskey;" control="selectLangs">&fonts.label;</label>
<label data-l10n-id="fonts-langgroup-header" control="selectLangs"/>
</hbox>
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
<hbox>
<menulist id="selectLangs" preference="font.language.group"
onsyncfrompreference="return gFontsDialog.readFontLanguageGroup();">
<menupopup>
<menuitem value="ar" label="&font.langGroup.arabic;"/>
<menuitem value="x-armn" label="&font.langGroup.armenian;"/>
<menuitem value="x-beng" label="&font.langGroup.bengali;"/>
<menuitem value="zh-CN" label="&font.langGroup.simpl-chinese;"/>
<menuitem value="zh-HK" label="&font.langGroup.trad-chinese-hk;"/>
<menuitem value="zh-TW" label="&font.langGroup.trad-chinese;"/>
<menuitem value="x-cyrillic" label="&font.langGroup.cyrillic;"/>
<menuitem value="x-devanagari" label="&font.langGroup.devanagari;"/>
<menuitem value="x-ethi" label="&font.langGroup.ethiopic;"/>
<menuitem value="x-geor" label="&font.langGroup.georgian;"/>
<menuitem value="el" label="&font.langGroup.el;"/>
<menuitem value="x-gujr" label="&font.langGroup.gujarati;"/>
<menuitem value="x-guru" label="&font.langGroup.gurmukhi;"/>
<menuitem value="he" label="&font.langGroup.hebrew;"/>
<menuitem value="ja" label="&font.langGroup.japanese;"/>
<menuitem value="x-knda" label="&font.langGroup.kannada;"/>
<menuitem value="x-khmr" label="&font.langGroup.khmer;"/>
<menuitem value="ko" label="&font.langGroup.korean;"/>
<menuitem value="x-western" label="&font.langGroup.latin;"/>
<menuitem value="x-mlym" label="&font.langGroup.malayalam;"/>
<menuitem value="x-math" label="&font.langGroup.math;"/>
<menuitem value="x-orya" label="&font.langGroup.odia;"/>
<menuitem value="x-sinh" label="&font.langGroup.sinhala;"/>
<menuitem value="x-tamil" label="&font.langGroup.tamil;"/>
<menuitem value="x-telu" label="&font.langGroup.telugu;"/>
<menuitem value="th" label="&font.langGroup.thai;"/>
<menuitem value="x-tibt" label="&font.langGroup.tibetan;"/>
<menuitem value="x-cans" label="&font.langGroup.canadian;"/>
<menuitem value="x-unicode" label="&font.langGroup.other;"/>
<menuitem value="ar" data-l10n-id="fonts-langgroup-arabic"/>
<menuitem value="x-armn" data-l10n-id="fonts-langgroup-armenian"/>
<menuitem value="x-beng" data-l10n-id="fonts-langgroup-bengali"/>
<menuitem value="zh-CN" data-l10n-id="fonts-langgroup-simpl-chinese"/>
<menuitem value="zh-HK" data-l10n-id="fonts-langgroup-trad-chinese-hk"/>
<menuitem value="zh-TW" data-l10n-id="fonts-langgroup-trad-chinese"/>
<menuitem value="x-cyrillic" data-l10n-id="fonts-langgroup-cyrillic"/>
<menuitem value="x-devanagari" data-l10n-id="fonts-langgroup-devanagari"/>
<menuitem value="x-ethi" data-l10n-id="fonts-langgroup-ethiopic"/>
<menuitem value="x-geor" data-l10n-id="fonts-langgroup-georgian"/>
<menuitem value="el" data-l10n-id="fonts-langgroup-el"/>
<menuitem value="x-gujr" data-l10n-id="fonts-langgroup-gujarati"/>
<menuitem value="x-guru" data-l10n-id="fonts-langgroup-gurmukhi"/>
<menuitem value="he" data-l10n-id="fonts-langgroup-hebrew"/>
<menuitem value="ja" data-l10n-id="fonts-langgroup-japanese"/>
<menuitem value="x-knda" data-l10n-id="fonts-langgroup-kannada"/>
<menuitem value="x-khmr" data-l10n-id="fonts-langgroup-khmer"/>
<menuitem value="ko" data-l10n-id="fonts-langgroup-korean"/>
<menuitem value="x-western" data-l10n-id="fonts-langgroup-latin"/>
<menuitem value="x-mlym" data-l10n-id="fonts-langgroup-malayalam"/>
<menuitem value="x-math" data-l10n-id="fonts-langgroup-math"/>
<menuitem value="x-orya" data-l10n-id="fonts-langgroup-odia"/>
<menuitem value="x-sinh" data-l10n-id="fonts-langgroup-sinhala"/>
<menuitem value="x-tamil" data-l10n-id="fonts-langgroup-tamil"/>
<menuitem value="x-telu" data-l10n-id="fonts-langgroup-telugu"/>
<menuitem value="th" data-l10n-id="fonts-langgroup-thai"/>
<menuitem value="x-tibt" data-l10n-id="fonts-langgroup-tibetan"/>
<menuitem value="x-cans" data-l10n-id="fonts-langgroup-canadian"/>
<menuitem value="x-unicode" data-l10n-id="fonts-langgroup-other"/>
</menupopup>
</menulist>
</hbox>
@ -98,20 +95,19 @@
<row align="center">
<hbox align="center" pack="end">
<label accesskey="&proportional2.accesskey;" control="defaultFontType">&proportional2.label;</label>
<label data-l10n-id="fonts-proportional-header" control="defaultFontType"/>
</hbox>
<!-- This <hbox> is needed to position search tooltips correctly. -->
<hbox>
<menulist id="defaultFontType" flex="1" style="width: 0px;">
<menupopup>
<menuitem value="serif" label="&useDefaultFontSerif.label;"/>
<menuitem value="sans-serif" label="&useDefaultFontSansSerif.label;"/>
<menuitem value="serif" data-l10n-id="fonts-default-serif"/>
<menuitem value="sans-serif" data-l10n-id="fonts-default-sans-serif"/>
</menupopup>
</menulist>
</hbox>
<hbox align="center" pack="end">
<label accesskey="&sizeProportional.accesskey;"
control="sizeVar">&size2.label;</label>
<label data-l10n-id="fonts-proportional-size" control="sizeVar"/>
</hbox>
<!-- This <hbox> is needed to position search tooltips correctly. -->
<hbox>
@ -148,7 +144,7 @@
</row>
<row align="center">
<hbox align="center" pack="end">
<label accesskey="&serif2.accesskey;" control="serif">&serif2.label;</label>
<label data-l10n-id="fonts-serif" control="serif"/>
</hbox>
<hbox>
<menulist id="serif" flex="1" style="width: 0px;" delayprefsave="true"
@ -158,7 +154,7 @@
</row>
<row align="center">
<hbox align="center" pack="end">
<label accesskey="&sans-serif2.accesskey;" control="sans-serif">&sans-serif2.label;</label>
<label data-l10n-id="fonts-sans-serif" control="sans-serif"/>
</hbox>
<hbox>
<menulist id="sans-serif" flex="1" style="width: 0px;" delayprefsave="true"
@ -168,15 +164,14 @@
</row>
<row align="center">
<hbox align="center" pack="end">
<label accesskey="&monospace2.accesskey;" control="monospace">&monospace2.label;</label>
<label data-l10n-id="fonts-monospace" control="monospace"/>
</hbox>
<hbox>
<menulist id="monospace" flex="1" style="width: 0px;" crop="right" delayprefsave="true"
onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
</hbox>
<hbox align="center" pack="end">
<label accesskey="&sizeMonospace.accesskey;"
control="sizeMono">&size2.label;</label>
<label data-l10n-id="fonts-monospace-size" control="sizeMono"/>
</hbox>
<hbox>
<menulist id="sizeMono" delayprefsave="true">
@ -216,12 +211,12 @@
<hbox flex="1">
<spacer flex="1"/>
<hbox align="center" pack="end">
<label accesskey="&minSize2.accesskey;" control="minSize">&minSize2.label;</label>
<label data-l10n-id="fonts-minsize" control="minSize"/>
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
<hbox>
<menulist id="minSize">
<menupopup>
<menuitem value="0" label="&minSize.none;"/>
<menuitem value="0" data-l10n-id="fonts-minsize-none"/>
<menuitem value="9" label="9"/>
<menuitem value="10" label="10"/>
<menuitem value="11" label="11"/>
@ -256,7 +251,7 @@
<separator class="groove"/>
<hbox>
<checkbox id="useDocumentFonts"
label="&allowPagesToUseOwn.label;" accesskey="&allowPagesToUseOwn.accesskey;"
data-l10n-id="fonts-allow-own"
preference="browser.display.use_document_fonts"
onsyncfrompreference="return gFontsDialog.readUseDocumentFonts();"
onsynctopreference="return gFontsDialog.writeUseDocumentFonts();"/>
@ -265,33 +260,32 @@
<!-- Text Encoding -->
<groupbox>
<caption><label>&languages.customize.Fallback2.grouplabel;</label></caption>
<description>&languages.customize.Fallback2.desc;</description>
<caption><label data-l10n-id="fonts-languages-fallback-header"/></caption>
<description data-l10n-id="fonts-languages-fallback-desc"/>
<hbox align="center">
<label accesskey="&languages.customize.Fallback3.accesskey;"
control="DefaultCharsetList">&languages.customize.Fallback3.label;</label>
<label data-l10n-id="fonts-languages-fallback-label" control="DefaultCharsetList"/>
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
<hbox>
<menulist id="DefaultCharsetList" preference="intl.charset.fallback.override">
<menupopup>
<menuitem label="&languages.customize.Fallback.auto;" value=""/>
<menuitem label="&languages.customize.Fallback.arabic;" value="windows-1256"/>
<menuitem label="&languages.customize.Fallback.baltic;" value="windows-1257"/>
<menuitem label="&languages.customize.Fallback.ceiso;" value="ISO-8859-2"/>
<menuitem label="&languages.customize.Fallback.cewindows;" value="windows-1250"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-auto" value=""/>
<menuitem data-l10n-id="fonts-languages-fallback-name-arabic" value="windows-1256"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-baltic" value="windows-1257"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-ceiso" value="ISO-8859-2"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-cewindows" value="windows-1250"/>
<!-- Using gbk instead of GBK for compat with previously-stored prefs.
The value gets normalized in dom/encoding/FallbackEncoding.cpp. -->
<menuitem label="&languages.customize.Fallback.simplified;" value="gbk"/>
<menuitem label="&languages.customize.Fallback.traditional;" value="Big5"/>
<menuitem label="&languages.customize.Fallback.cyrillic;" value="windows-1251"/>
<menuitem label="&languages.customize.Fallback.greek;" value="ISO-8859-7"/>
<menuitem label="&languages.customize.Fallback.hebrew;" value="windows-1255"/>
<menuitem label="&languages.customize.Fallback.japanese;" value="Shift_JIS"/>
<menuitem label="&languages.customize.Fallback.korean;" value="EUC-KR"/>
<menuitem label="&languages.customize.Fallback.thai;" value="windows-874"/>
<menuitem label="&languages.customize.Fallback.turkish;" value="windows-1254"/>
<menuitem label="&languages.customize.Fallback.vietnamese;" value="windows-1258"/>
<menuitem label="&languages.customize.Fallback.other;" value="windows-1252"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-simplified" value="gbk"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-traditional" value="Big5"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-cyrillic" value="windows-1251"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-greek" value="ISO-8859-7"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-hebrew" value="windows-1255"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-japanese" value="Shift_JIS"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-korean" value="EUC-KR"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-thai" value="windows-874"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-turkish" value="windows-1254"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-vietnamese" value="windows-1258"/>
<menuitem data-l10n-id="fonts-languages-fallback-name-other" value="windows-1252"/>
</menupopup>
</menulist>
</hbox>

View File

@ -477,16 +477,24 @@ var gSearchResultsPane = {
// Map the localized messages taking value or a selected attribute and
// building a string of concatenated translated strings out of it.
let keywords = messages.map((msg, i) => {
if (msg === null) {
console.warn(`Missing search l10n id "${refs[i][0]}"`);
let [refId, refAttr] = refs[i];
if (!msg) {
console.error(`Missing search l10n id "${refId}"`);
return null;
}
if (refs[i][1]) {
let attr = msg.attrs.find(a => a.name === refs[i][1]);
if (attr) {
return attr.value;
if (refAttr) {
let attr = msg.attrs.find(a => a.name === refAttr);
if (!attr) {
console.error(`Missing search l10n id "${refId}.${refAttr}"`);
return null;
}
return null;
if (attr.value === "") {
console.error(`Empty value added to search-l10n-ids "${refId}.${refAttr}"`);
}
return attr.value;
}
if (msg.value === "") {
console.error(`Empty value added to search-l10n-ids "${refId}"`);
}
return msg.value;
}).filter(keyword => keyword !== null).join(" ");

View File

@ -66,7 +66,7 @@
class="homepage-button check-home-page-controlled"
data-l10n-id="choose-bookmark"
preference="pref.browser.homepage.disable_button.bookmark_page"
searchkeywords="&selectBookmark.title; &selectBookmark.label;"/>
search-l10n-ids="select-bookmark-window.title, select-bookmark-desc"/>
</hbox>
</vbox>
</vbox>

View File

@ -199,66 +199,68 @@
class="accessory-button"
icon="select-font"
data-l10n-id="advanced-fonts"
searchkeywords="&fontsDialog.title;
&fonts.label;
&size2.label;
&proportional2.label;
&serif2.label;
&sans-serif2.label;
&monospace2.label;
&font.langGroup.latin;
&font.langGroup.japanese;
&font.langGroup.trad-chinese;
&font.langGroup.simpl-chinese;
&font.langGroup.trad-chinese-hk;
&font.langGroup.korean;
&font.langGroup.cyrillic;
&font.langGroup.el;
&font.langGroup.other;
&font.langGroup.thai;
&font.langGroup.hebrew;
&font.langGroup.arabic;
&font.langGroup.devanagari;
&font.langGroup.tamil;
&font.langGroup.armenian;
&font.langGroup.bengali;
&font.langGroup.canadian;
&font.langGroup.ethiopic;
&font.langGroup.georgian;
&font.langGroup.gujarati;
&font.langGroup.gurmukhi;
&font.langGroup.khmer;
&font.langGroup.malayalam;
&font.langGroup.math;
&font.langGroup.odia;
&font.langGroup.telugu;
&font.langGroup.kannada;
&font.langGroup.sinhala;
&font.langGroup.tibetan;
&minSize2.label;
&minSize.none;
&useDefaultFontSerif.label;
&useDefaultFontSansSerif.label;
&allowPagesToUseOwn.label;
&languages.customize.Fallback2.grouplabel;
&languages.customize.Fallback3.label;
&languages.customize.Fallback2.desc;
&languages.customize.Fallback.auto;
&languages.customize.Fallback.arabic;
&languages.customize.Fallback.baltic;
&languages.customize.Fallback.ceiso;
&languages.customize.Fallback.cewindows;
&languages.customize.Fallback.simplified;
&languages.customize.Fallback.traditional;
&languages.customize.Fallback.cyrillic;
&languages.customize.Fallback.greek;
&languages.customize.Fallback.hebrew;
&languages.customize.Fallback.japanese;
&languages.customize.Fallback.korean;
&languages.customize.Fallback.thai;
&languages.customize.Fallback.turkish;
&languages.customize.Fallback.vietnamese;
&languages.customize.Fallback.other;"/>
search-l10n-ids="
fonts-window.title,
fonts-header,
fonts-proportional-size,
fonts-proportional-header,
fonts-serif,
fonts-sans-serif,
fonts-monospace,
fonts-langgroup-arabic.label,
fonts-langgroup-armenian.label,
fonts-langgroup-bengali.label,
fonts-langgroup-simpl-chinese.label,
fonts-langgroup-trad-chinese-hk.label,
fonts-langgroup-trad-chinese.label,
fonts-langgroup-cyrillic.label,
fonts-langgroup-devanagari.label,
fonts-langgroup-ethiopic.label,
fonts-langgroup-georgian.label,
fonts-langgroup-el.label,
fonts-langgroup-gujarati.label,
fonts-langgroup-gurmukhi.label,
fonts-langgroup-japanese.label,
fonts-langgroup-hebrew.label,
fonts-langgroup-kannada.label,
fonts-langgroup-khmer.label,
fonts-langgroup-korean.label,
fonts-langgroup-latin.label,
fonts-langgroup-malayalam.label,
fonts-langgroup-math.label,
fonts-langgroup-odia.label,
fonts-langgroup-sinhala.label,
fonts-langgroup-tamil.label,
fonts-langgroup-telugu.label,
fonts-langgroup-thai.label,
fonts-langgroup-tibetan.label,
fonts-langgroup-canadian.label,
fonts-langgroup-other.label,
fonts-minsize,
fonts-minsize-none.label,
fonts-default-serif.label,
fonts-default-sans-serif.label,
fonts-allow-own.label,
fonts-languages-fallback-header,
fonts-languages-fallback-label,
fonts-languages-fallback-desc,
fonts-languages-fallback-name-auto.label,
fonts-languages-fallback-name-arabic.label,
fonts-languages-fallback-name-baltic.label,
fonts-languages-fallback-name-ceiso.label,
fonts-languages-fallback-name-cewindows.label,
fonts-languages-fallback-name-simplified.label,
fonts-languages-fallback-name-traditional.label,
fonts-languages-fallback-name-cyrillic.label,
fonts-languages-fallback-name-greek.label,
fonts-languages-fallback-name-hebrew.label,
fonts-languages-fallback-name-japanese.label,
fonts-languages-fallback-name-korean.label,
fonts-languages-fallback-name-thai.label,
fonts-languages-fallback-name-turkish.label,
fonts-languages-fallback-name-vietnamese.label,
fonts-languages-fallback-name-other.label,
" />
</hbox>
</hbox>
<hbox id="colorsSettings">
@ -269,18 +271,20 @@
class="accessory-button"
icon="select-color"
data-l10n-id="colors-settings"
searchkeywords="&overrideDefaultPageColors2.label;
&overrideDefaultPageColors.always.label;
&overrideDefaultPageColors.auto.label;
&overrideDefaultPageColors.never.label;
&color;
&textColor2.label;
&backgroundColor2.label;
&useSystemColors.label;
&underlineLinks.label;
&links;
&linkColor2.label;
&visitedLinkColor2.label;"/>
search-l10n-ids="
colors-page-override,
colors-page-override-option-always.label,
colors-page-override-option-auto.label,
colors-page-override-option-never.label,
colors-text-and-background,
colors-text-header,
colors-background,
colors-use-system,
colors-underline-links,
colors-links-header,
colors-unvisited-links,
colors-visited-links
"/>
</hbox>
</hbox>
</vbox>
@ -297,13 +301,15 @@
<button id="chooseLanguage"
class="accessory-button"
data-l10n-id="choose-button"
searchkeywords="&languages.customize.Header;
&languages.customize2.description;
&languages.customize.moveUp.label;
&languages.customize.moveDown.label;
&languages.customize.deleteButton.label;
&languages.customize.selectLanguage.label;
&languages.customize.addButton.label;"/>
search-l10n-ids="
languages-window.title,
languages-description,
languages-customize-moveup.label,
languages-customize-movedown.label,
languages-customize-remove.label,
languages-customize-select-language.label,
languages-customize-add.label,
" />
</hbox>
</hbox>
@ -674,25 +680,27 @@
class="accessory-button"
icon="network"
data-l10n-id="network-proxy-connection-settings"
searchkeywords="&connectionsDialog.title;
&noProxyTypeRadio.label;
&WPADTypeRadio.label;
&systemTypeRadio.label;
&manualTypeRadio2.label;
&http2.label;
&ssl2.label;
&ftp2.label;
&port2.label;
&socks2.label;
&socks4.label;
&socks5.label;
&noproxy2.label;
&noproxyExplain.label;
&shareproxy.label;
&autoTypeRadio2.label;
&reload.label;
&autologinproxy.label;
&socksRemoteDNS.label2;"/>
search-l10n-ids="
connection-window.title,
connection-proxy-option-no.label,
connection-proxy-option-auto.label,
connection-proxy-option-system.label,
connection-proxy-option-manual.label,
connection-proxy-http,
connection-proxy-ssl,
connection-proxy-ftp,
connection-proxy-http-port,
connection-proxy-socks,
connection-proxy-socks4,
connection-proxy-socks5,
connection-proxy-noproxy,
connection-proxy-noproxy-desc,
connection-proxy-http-share.label,
connection-proxy-autotype.label,
connection-proxy-reload.label,
connection-proxy-autologin.label,
connection-proxy-socks-remote-dns.label
" />
</hbox>
</hbox>
</groupbox>

View File

@ -18,48 +18,27 @@
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % selectBookmarkDTD SYSTEM
"chrome://browser/locale/preferences/selectBookmark.dtd">
<!ENTITY % languagesDTD SYSTEM "chrome://browser/locale/preferences/languages.dtd">
<!ENTITY % fontDTD SYSTEM "chrome://browser/locale/preferences/fonts.dtd">
<!ENTITY % colorsDTD SYSTEM "chrome://browser/locale/preferences/colors.dtd">
<!ENTITY % permissionsDTD SYSTEM "chrome://browser/locale/preferences/permissions.dtd">
<!ENTITY % passwordManagerDTD SYSTEM "chrome://passwordmgr/locale/passwordManager.dtd">
<!ENTITY % historyDTD SYSTEM "chrome://mozapps/locale/update/history.dtd">
<!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd">
<!ENTITY % deviceManangerDTD SYSTEM "chrome://pippki/locale/deviceManager.dtd">
<!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd">
<!ENTITY % siteDataSettingsDTD SYSTEM
"chrome://browser/locale/preferences/siteDataSettings.dtd" >
<!ENTITY % clearSiteDataDTD SYSTEM
"chrome://browser/locale/preferences/clearSiteData.dtd" >
<!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
<!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
<!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
<!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
<!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd">
<!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
%aboutDialogDTD;
%brandDTD;
%selectBookmarkDTD;
%languagesDTD;
%fontDTD;
%colorsDTD;
%permissionsDTD;
%passwordManagerDTD;
%historyDTD;
%certManagerDTD;
%deviceManangerDTD;
%connectionDTD;
%siteDataSettingsDTD;
%clearSiteDataDTD;
%privacyDTD;
%syncBrandDTD;
%syncDTD;
%sanitizeDTD;
%mainDTD;
%aboutHomeDTD;
%contentDTD;
]>
@ -77,6 +56,18 @@
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/branding/sync-brand.ftl"/>
<link rel="localization" href="browser/preferences/preferences.ftl"/>
<!-- Links below are only used for search-l10n-ids into subdialogs -->
<link rel="localization" href="browser/preferences/blocklists.ftl"/>
<link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
<link rel="localization" href="browser/preferences/colors.ftl"/>
<link rel="localization" href="browser/preferences/connection.ftl"/>
<link rel="localization" href="browser/preferences/fonts.ftl"/>
<link rel="localization" href="browser/preferences/languages.ftl"/>
<link rel="localization" href="browser/preferences/permissions.ftl"/>
<link rel="localization" href="browser/preferences/selectBookmark.ftl"/>
<link rel="localization" href="browser/preferences/siteDataSettings.ftl"/>
<script type="text/javascript" src="chrome://global/content/l10n.js"></script>
<html:link rel="shortcut icon"
@ -102,11 +93,6 @@
<stringbundle id="browserBundle"
src="chrome://browser/locale/browser.properties"/>
<stringbundleset id="appManagerBundleset">
<stringbundle id="appManagerBundle"
src="chrome://browser/locale/preferences/applicationManager.properties"/>
</stringbundleset>
<stack flex="1">
<hbox flex="1">

View File

@ -404,10 +404,6 @@ var gPrivacyPane = {
bundlePrefs.getString("trackingprotectionpermissionstitle"),
bundlePrefs.getString("trackingprotectionpermissionstext2"),
]);
appendSearchKeywords("changeBlockList", [
bundlePrefs.getString("blockliststitle"),
bundlePrefs.getString("blockliststext"),
]);
appendSearchKeywords("popupPolicyButton", [
bundlePrefs.getString("popuppermissionstitle2"),
bundlePrefs.getString("popuppermissionstext"),
@ -791,16 +787,7 @@ var gPrivacyPane = {
* Displays the available block lists for tracking protection.
*/
showBlockLists() {
var bundlePreferences = document.getElementById("bundlePreferences");
let brandName = document.getElementById("bundleBrand")
.getString("brandShortName");
var params = {
brandShortName: brandName,
windowTitle: bundlePreferences.getString("blockliststitle"),
introText: bundlePreferences.getString("blockliststext")
};
gSubDialog.open("chrome://browser/content/preferences/blocklists.xul",
null, params);
gSubDialog.open("chrome://browser/content/preferences/blocklists.xul", null);
},
// COOKIES AND SITE DATA

View File

@ -33,7 +33,7 @@
class="accessory-button"
data-l10n-id="forms-exceptions"
preference="pref.privacy.disable_button.view_passwords_exceptions"
searchkeywords="&address2.label;"/>
search-l10n-ids="permissions-address"/>
</hbox>
</hbox>
<hbox id="showPasswordBox" pack="end">
@ -226,32 +226,34 @@
<button id="clearSiteDataButton"
class="accessory-button"
icon="clear"
searchkeywords="&clearSiteData.label;
&clearCache.label;"
search-l10n-ids="clear-site-data-cookies, clear-site-data-cache"
data-l10n-id="sitedata-clear"/>
</hbox>
<hbox>
<button id="siteDataSettings"
class="accessory-button"
data-l10n-id="sitedata-settings"
searchkeywords="&window2.title;
&hostCol.label;
&cookiesCol.label;
&usageCol.label;"/>
search-l10n-ids="
site-data-settings-window.title,
site-data-column-host.label,
site-data-column-cookies.label,
site-data-column-storage.label,
"/>
</hbox>
<hbox>
<button id="cookieExceptions"
class="accessory-button"
data-l10n-id="sitedata-cookies-exceptions"
preference="pref.privacy.disable_button.cookie_exceptions"
searchkeywords="&address2.label;
&block.label;
&session.label;
&allow.label;
&removepermission2.label;
&removeallpermissions2.label;
&button.cancel.label;
&button.ok.label;"/>
search-l10n-ids="
permissions-address,
permissions-block.label,
permissions-allow.label,
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label
" />
</hbox>
</vbox>
</hbox>
@ -335,10 +337,12 @@
hidden="true"
data-l10n-id="tracking-exceptions"
preference="pref.privacy.disable_button.tracking_protection_exceptions"
searchkeywords="&removepermission2.label;
&removeallpermissions2.label;
&button.cancel.label;
&button.ok.label;"/>
search-l10n-ids="
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label
"/>
</hbox>
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
<hbox>
@ -347,7 +351,7 @@
flex="1"
data-l10n-id="tracking-change-block-list"
preference="pref.privacy.disable_button.change_blocklist"
searchkeywords="&button.cancel.label; &button.ok.label;"/>
search-l10n-ids="blocklist-window.title, blocklist-desc, blocklist-button-cancel.label, blocklist-button-ok.label"/>
</hbox>
</vbox>
</hbox>
@ -390,10 +394,12 @@
<button id="locationSettingsButton"
class="accessory-button"
data-l10n-id="permissions-location-settings"
searchkeywords="&removepermission2.label;
&removeallpermissions2.label;
&button.cancel.label;
&button.ok.label;"/>
search-l10n-ids="
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label,
" />
</hbox>
</row>
@ -407,10 +413,12 @@
<button id="cameraSettingsButton"
class="accessory-button"
data-l10n-id="permissions-camera-settings"
searchkeywords="&removepermission2.label;
&removeallpermissions2.label;
&button.cancel.label;
&button.ok.label;"/>
search-l10n-ids="
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label,
" />
</hbox>
</row>
@ -424,10 +432,12 @@
<button id="microphoneSettingsButton"
class="accessory-button"
data-l10n-id="permissions-microphone-settings"
searchkeywords="&removepermission2.label;
&removeallpermissions2.label;
&button.cancel.label;
&button.ok.label;"/>
search-l10n-ids="
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label,
" />
</hbox>
</row>
@ -446,10 +456,12 @@
<button id="notificationSettingsButton"
class="accessory-button"
data-l10n-id="permissions-notification-settings"
searchkeywords="&removepermission2.label;
&removeallpermissions2.label;
&button.cancel.label;
&button.ok.label;"/>
search-l10n-ids="
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label,
" />
</hbox>
</row>
</rows>
@ -472,7 +484,11 @@
<button id="popupPolicyButton"
class="accessory-button"
data-l10n-id="permissions-block-popups-exceptions"
searchkeywords="&address2.label; &button.cancel.label; &button.ok.label;"/>
search-l10n-ids="
permissions-address,
permissions-button-cancel.label,
permissions-button-ok.label
" />
</hbox>
</hbox>
@ -487,12 +503,14 @@
<button id="addonExceptions"
class="accessory-button"
data-l10n-id="permissions-addon-exceptions"
searchkeywords="&address2.label;
&allow.label;
&removepermission2.label;
&removeallpermissions2.label;
&button.cancel.label;
&button.ok.label;"/>
search-l10n-ids="
permissions-address,
permissions-allow.label,
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label,
" />
</hbox>
</hbox>

View File

@ -12,3 +12,4 @@ support-files =
skip-if = (os == 'linux' && debug) # Bug 1439332
[browser_siteData2.js]
[browser_siteData3.js]
[browser_siteData_multi_select.js]

View File

@ -1,19 +1,5 @@
"use strict";
function promiseSettingsDialogClose() {
return new Promise(resolve => {
let win = gBrowser.selectedBrowser.contentWindow;
let dialogOverlay = win.gSubDialog._topDialog._overlay;
let dialogWin = win.gSubDialog._topDialog._frame.contentWindow;
dialogWin.addEventListener("unload", function unload() {
if (dialogWin.document.documentURI === "chrome://browser/content/preferences/siteDataSettings.xul") {
isnot(dialogOverlay.style.visibility, "visible", "The Settings dialog should be hidden");
resolve();
}
}, { once: true });
});
}
function assertAllSitesNotListed(win) {
let frameDoc = win.gSubDialog._topDialog._frame.contentDocument;
let removeBtn = frameDoc.getElementById("removeSelected");

View File

@ -0,0 +1,84 @@
"use strict";
// Test selecting and removing partial sites
add_task(async function() {
mockSiteDataManager.register(SiteDataManager, [
{
usage: 1024,
origin: "https://account.xyz.com",
persisted: true
},
{
usage: 1024,
origin: "https://shopping.xyz.com",
persisted: false
},
{
usage: 1024,
origin: "http://cinema.bar.com",
persisted: true
},
{
usage: 1024,
origin: "http://email.bar.com",
persisted: false
},
{
usage: 1024,
origin: "https://s3-us-west-2.amazonaws.com",
persisted: true
},
{
usage: 1024,
origin: "https://127.0.0.1",
persisted: false
},
{
usage: 1024,
origin: "https://[0:0:0:0:0:0:0:1]",
persisted: true
},
]);
let fakeHosts = mockSiteDataManager.fakeSites.map(site => site.principal.URI.host);
let updatePromise = promiseSiteDataManagerSitesUpdated();
await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true });
await updatePromise;
await openSiteDataSettingsDialog();
let doc = gBrowser.selectedBrowser.contentDocument;
// Test the initial state
assertSitesListed(doc, fakeHosts);
let removeDialogOpenPromise = BrowserTestUtils.promiseAlertDialogOpen("accept", REMOVE_DIALOG_URL);
let settingsDialogClosePromise = promiseSettingsDialogClose();
let win = gBrowser.selectedBrowser.contentWindow;
let frameDoc = win.gSubDialog._topDialog._frame.contentDocument;
// Select some sites to remove.
let sitesList = frameDoc.getElementById("sitesList");
fakeHosts.slice(0, 2).forEach(host => {
let site = sitesList.querySelector(`richlistitem[host="${host}"]`);
sitesList.addItemToSelection(site);
});
let removeBtn = frameDoc.getElementById("removeSelected");
is(removeBtn.disabled, false, "Should enable the removeSelected button");
removeBtn.doCommand();
is(removeBtn.disabled, true, "Should disable the removeSelected button");
let saveBtn = frameDoc.getElementById("save");
assertSitesListed(doc, fakeHosts.slice(2));
saveBtn.doCommand();
await removeDialogOpenPromise;
await settingsDialogClosePromise;
await openSiteDataSettingsDialog();
assertSitesListed(doc, fakeHosts.slice(2));
await mockSiteDataManager.unregister();
BrowserTestUtils.removeTab(gBrowser.selectedTab);
});

View File

@ -115,6 +115,20 @@ function openSiteDataSettingsDialog() {
return fullyLoadPromise;
}
function promiseSettingsDialogClose() {
return new Promise(resolve => {
let win = gBrowser.selectedBrowser.contentWindow;
let dialogOverlay = win.gSubDialog._topDialog._overlay;
let dialogWin = win.gSubDialog._topDialog._frame.contentWindow;
dialogWin.addEventListener("unload", function unload() {
if (dialogWin.document.documentURI === "chrome://browser/content/preferences/siteDataSettings.xul") {
isnot(dialogOverlay.style.visibility, "visible", "The Settings dialog should be hidden");
resolve();
}
}, { once: true });
});
}
function assertSitesListed(doc, hosts) {
let frameDoc = content.gSubDialog._topDialog._frame.contentDocument;
let removeBtn = frameDoc.getElementById("removeSelected");

View File

@ -12,7 +12,7 @@ browser.jar:
content/browser/preferences/clearSiteData.xul
* content/browser/preferences/colors.xul
content/browser/preferences/colors.js
* content/browser/preferences/connection.xul
content/browser/preferences/connection.xul
content/browser/preferences/connection.js
content/browser/preferences/fonts.xul
content/browser/preferences/fonts.js

View File

@ -112,6 +112,7 @@ var gLanguagesDialog = {
menuitem.setAttribute("label", this._availableLanguagesList[i].name);
}
}
this._availableLanguages.setAttribute("label", this._availableLanguages.getAttribute("placeholder"));
},
readAcceptLanguages() {
@ -187,8 +188,6 @@ var gLanguagesDialog = {
// Rebuild the available list with the added item removed...
this._buildAvailableLanguageList();
this._availableLanguages.setAttribute("label", this._availableLanguages.getAttribute("label2"));
},
removeLanguage() {

View File

@ -5,33 +5,29 @@
- 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 dialog [
<!ENTITY % preferencesDTD SYSTEM "chrome://global/locale/preferences.dtd">
%preferencesDTD;
<!ENTITY % languagesDTD SYSTEM "chrome://browser/locale/preferences/languages.dtd">
%languagesDTD;
]>
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
<dialog id="LanguagesDialog" type="child" class="prefwindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&languages.customize.Header;"
data-l10n-id="languages-window"
data-l10n-attrs="title, style"
buttons="accept,cancel,help"
persist="lastSelected screenX screenY"
role="dialog"
onload="gLanguagesDialog.init();"
helpTopic="prefs-languages"
ondialoghelp="openPrefsHelp()"
style="width: &window.width;">
ondialoghelp="openPrefsHelp()">
<link rel="localization" href="browser/preferences/languages.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
<script type="application/javascript" src="chrome://browser/content/preferences/languages.js"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="Preferences.close(event)"/>
<key data-l10n-id="languages-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
</keyset>
<vbox id="LanguagesDialogPane" class="prefpane largeDialogContainer">
@ -41,9 +37,9 @@
<stringbundle id="bundleAccepted" src="resource://gre/res/language.properties"/>
</stringbundleset>
<description>&languages.customize2.description;</description>
<description data-l10n-id="languages-description"/>
<checkbox id="spoofEnglish"
label="&languages.customize.spoofEnglish;"
data-l10n-id="languages-customize-spoof-english"
preference="privacy.spoof_english"
onsyncfrompreference="return gLanguagesDialog.readSpoofEnglish();"
onsynctopreference="return gLanguagesDialog.writeSpoofEnglish();"/>
@ -61,16 +57,13 @@
onsynctopreference="return gLanguagesDialog.writeAcceptLanguages();"/>
<vbox>
<button id="up" class="up" oncommand="gLanguagesDialog.moveUp();" disabled="true"
label="&languages.customize.moveUp.label;"
accesskey="&languages.customize.moveUp.accesskey;"
data-l10n-id="languages-customize-moveup"
preference="pref.browser.language.disable_button.up"/>
<button id="down" class="down" oncommand="gLanguagesDialog.moveDown();" disabled="true"
label="&languages.customize.moveDown.label;"
accesskey="&languages.customize.moveDown.accesskey;"
data-l10n-id="languages-customize-movedown"
preference="pref.browser.language.disable_button.down"/>
<button id="remove" oncommand="gLanguagesDialog.removeLanguage();" disabled="true"
label="&languages.customize.deleteButton.label;"
accesskey="&languages.customize.deleteButton.accesskey;"
data-l10n-id="languages-customize-remove"
preference="pref.browser.language.disable_button.remove"/>
</vbox>
</row>
@ -81,14 +74,12 @@
<!-- This <vbox> is needed to position search tooltips correctly. -->
<vbox>
<menulist id="availableLanguages" oncommand="gLanguagesDialog.onAvailableLanguageSelect();"
label="&languages.customize.selectLanguage.label;"
label2="&languages.customize.selectLanguage.label;">
data-l10n-id="languages-customize-select-language" data-l10n-attrs="placeholder">
<menupopup id="availableLanguagesPopup"/>
</menulist>
</vbox>
<button id="addButton" oncommand="gLanguagesDialog.addLanguage();" disabled="true"
label="&languages.customize.addButton.label;"
accesskey="&languages.customize.addButton.accesskey;"/>
data-l10n-id="languages-customize-add"/>
</row>
</rows>
</grid>

View File

@ -7,18 +7,19 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/permissions.dtd" >
<window id="PermissionsDialog" class="windowDialog"
windowtype="Browser:Permissions"
title="&window.title;"
data-l10n-id="permissions-window"
data-l10n-attrs="title, style"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"
onload="gPermissionManager.onLoad();"
onunload="gPermissionManager.uninit();"
persist="screenX screenY width height"
onkeypress="gPermissionManager.onWindowKeyPress(event);">
<link rel="localization" href="browser/preferences/permissions.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script src="chrome://global/content/treeUtils.js"/>
<script src="chrome://browser/content/preferences/permissions.js"/>
@ -26,24 +27,24 @@
src="chrome://browser/locale/preferences/preferences.properties"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
<key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
</keyset>
<vbox class="contentPane largeDialogContainer" flex="1">
<description id="permissionsText" control="url"/>
<separator class="thin"/>
<label id="urlLabel" control="url" accesskey="&address2.accesskey;">&address2.label;</label>
<label id="urlLabel" control="url" data-l10n-id="permissions-address"/>
<hbox align="start">
<textbox id="url" flex="1"
oninput="gPermissionManager.onHostInput(event.target);"
onkeypress="gPermissionManager.onHostKeyPress(event);"/>
</hbox>
<hbox pack="end">
<button id="btnBlock" disabled="true" label="&block.label;" accesskey="&block.accesskey;"
<button id="btnBlock" disabled="true" data-l10n-id="permissions-block"
oncommand="gPermissionManager.addPermission(nsIPermissionManager.DENY_ACTION);"/>
<button id="btnSession" disabled="true" label="&session.label;" accesskey="&session.accesskey;"
<button id="btnSession" disabled="true" data-l10n-id="permissions-session"
oncommand="gPermissionManager.addPermission(nsICookiePermission.ACCESS_SESSION);"/>
<button id="btnAllow" disabled="true" label="&allow.label;" default="true" accesskey="&allow.accesskey;"
<button id="btnAllow" disabled="true" data-l10n-id="permissions-allow" default="true"
oncommand="gPermissionManager.addPermission(nsIPermissionManager.ALLOW_ACTION);"/>
</hbox>
<separator class="thin"/>
@ -52,10 +53,10 @@
onkeypress="gPermissionManager.onPermissionKeyPress(event)"
onselect="gPermissionManager.onPermissionSelected();">
<treecols>
<treecol id="siteCol" label="&treehead.sitename2.label;" flex="3"
<treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3"
data-field-name="origin" persist="width"/>
<splitter class="tree-splitter"/>
<treecol id="statusCol" label="&treehead.status.label;" flex="1"
<treecol id="statusCol" data-l10n-id="permissions-status" flex="1"
data-field-name="capability" persist="width"/>
</treecols>
<treechildren/>
@ -64,20 +65,20 @@
<vbox>
<hbox class="actionButtons" align="left" flex="1">
<button id="removePermission" disabled="true"
accesskey="&removepermission2.accesskey;"
icon="remove" label="&removepermission2.label;"
data-l10n-id="permissions-remove"
icon="remove"
oncommand="gPermissionManager.onPermissionDeleted();"/>
<button id="removeAllPermissions"
icon="clear" label="&removeallpermissions2.label;"
accesskey="&removeallpermissions2.accesskey;"
data-l10n-id="permissions-remove-all"
icon="clear"
oncommand="gPermissionManager.onAllPermissionsDeleted();"/>
</hbox>
<spacer flex="1"/>
<hbox class="actionButtons" align="right" flex="1">
<button oncommand="close();" icon="close"
label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
data-l10n-id="permissions-button-cancel" />
<button id="btnApplyChanges" oncommand="gPermissionManager.onApplyChanges();" icon="save"
label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
data-l10n-id="permissions-button-ok" />
</hbox>
</vbox>
</window>

View File

@ -9,15 +9,17 @@
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/selectBookmark.dtd">
<dialog id="selectBookmarkDialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&selectBookmark.title;" style="width: 32em;"
data-l10n-id="select-bookmark-window"
data-l10n-attrs="title, style"
persist="screenX screenY width height" screenX="24" screenY="24"
onload="SelectBookmarkDialog.init();"
ondialogaccept="SelectBookmarkDialog.accept();">
<link rel="localization" href="browser/preferences/selectBookmark.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script type="application/javascript"
src="chrome://browser/content/preferences/selectBookmark.js"/>
<script type="application/javascript"
@ -39,7 +41,7 @@
["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],
"chrome://browser/content/places/controller.js");
]]></script>
<description>&selectBookmark.label;</description>
<description data-l10n-id="select-bookmark-desc"/>
<separator class="thin"/>

View File

@ -8,17 +8,19 @@
<?xml-stylesheet href="chrome://browser/content/preferences/siteDataSettings.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/siteDataSettings.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/siteDataSettings.dtd" >
<dialog id="SiteDataRemoveSelectedDialog"
windowtype="Browser:SiteDataRemoveSelected"
width="500"
title="&removingDialog1.title;"
data-l10n-id="site-data-removing-window"
data-l10n-attrs="title"
onload="gSiteDataRemoveSelected.init();"
ondialogaccept="gSiteDataRemoveSelected.ondialogaccept(); return true;"
ondialogcancel="gSiteDataRemoveSelected.ondialogcancel(); return true;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<link rel="localization" href="browser/preferences/siteDataSettings.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script src="chrome://browser/content/preferences/siteDataRemoveSelected.js"/>
<stringbundle id="bundlePreferences"
@ -32,19 +34,20 @@
<vbox flex="1">
<!-- Only show this label on OS X because of no dialog title -->
<label id="removing-label"
data-l10n-id="site-data-removing-header"
#ifndef XP_MACOSX
hidden="true"
#endif
>&removingDialog1.title;</label>
/>
<separator class="thin"/>
<description id="removing-description">&removingSelected1.description;</description>
<description id="removing-description" data-l10n-id="site-data-removing-desc"/>
</vbox>
</hbox>
<separator />
<vbox flex="1">
<label>&siteTree3.label;</label>
<label data-l10n-id="site-data-removing-table"/>
<separator class="thin"/>
<tree id="sitesTree" flex="1" seltype="single" hidecolumnpicker="true">
<treecols>

View File

@ -259,10 +259,7 @@ let gSiteDataSettings = {
},
onClickRemoveSelected() {
let selected = this._list.selectedItem;
if (selected) {
this._removeSiteItems([selected]);
}
this._removeSiteItems(this._list.selectedItems);
this._list.clearSelection();
},

View File

@ -9,16 +9,19 @@
<?xml-stylesheet href="chrome://browser/content/preferences/siteDataSettings.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/siteDataSettings.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/siteDataSettings.dtd" >
<window id="SiteDataSettingsDialog" windowtype="Browser:SiteDataSettings"
class="windowDialog" title="&window2.title;"
data-l10n-id="site-data-settings-window"
data-l10n-attrs="title"
class="windowDialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: 45em;"
onload="gSiteDataSettings.init();"
onkeypress="gSiteDataSettings.onKeyPress(event);"
persist="screenX screenY width height">
<link rel="localization" href="browser/preferences/siteDataSettings.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script src="chrome://browser/content/preferences/siteDataSettings.js"/>
<stringbundle id="bundlePreferences"
@ -31,30 +34,30 @@
<hbox id="searchBoxContainer">
<textbox id="searchBox" type="search" flex="1"
placeholder="&searchTextboxPlaceHolder;" accesskey="&searchTextboxPlaceHolder.accesskey;"/>
data-l10n-id="site-data-search-textbox"/>
</hbox>
<separator class="thin"/>
<richlistbox id="sitesList" orient="vertical" flex="1">
<richlistbox seltype="multiple" id="sitesList" orient="vertical" flex="1">
<listheader>
<treecol flex="4" width="50" label="&hostCol.label;" id="hostCol"/>
<treecol flex="1" width="50" label="&cookiesCol.label;" id="cookiesCol"/>
<treecol flex="4" width="50" data-l10n-id="site-data-column-host" id="hostCol"/>
<treecol flex="1" width="50" data-l10n-id="site-data-column-cookies" id="cookiesCol"/>
<!-- Sorted by usage so the user can quickly see which sites use the most data. -->
<treecol flex="2" width="50" label="&usageCol.label;" id="usageCol" data-isCurrentSortCol="true"/>
<treecol flex="2" width="50" label="&lastAccessedCol.label;" id="lastAccessedCol" />
<treecol flex="2" width="50" data-l10n-id="site-data-column-storage" id="usageCol" data-isCurrentSortCol="true"/>
<treecol flex="2" width="50" data-l10n-id="site-data-column-last-used" id="lastAccessedCol" />
</listheader>
</richlistbox>
</vbox>
<hbox align="start">
<button id="removeSelected" label="&removeSelected.label;" accesskey="&removeSelected.accesskey;"/>
<button id="removeSelected" data-l10n-id="site-data-remove-selected"/>
<button id="removeAll"/>
</hbox>
<vbox align="end">
<hbox>
<button id="cancel" label="&cancel.label;" accesskey="&cancel.accesskey;"/>
<button id="save" label="&save.label;" accesskey="&save.accesskey;"/>
<button id="cancel" data-l10n-id="site-data-button-cancel"/>
<button id="save" data-l10n-id="site-data-button-save"/>
</hbox>
</vbox>

View File

@ -8,31 +8,33 @@
<?xml-stylesheet href="chrome://browser/content/preferences/sitePermissions.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/permissions.dtd" >
<window id="SitePermissionsDialog" class="windowDialog"
windowtype="Browser:SitePermissions"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"
data-l10n-id="permissions-window"
data-l10n-attrs="style"
onload="gSitePermissionsManager.onLoad();"
onunload="gSitePermissionsManager.uninit();"
persist="screenX screenY width height"
onkeypress="gSitePermissionsManager.onWindowKeyPress(event);">
<link rel="localization" href="browser/preferences/permissions.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script src="chrome://browser/content/preferences/sitePermissions.js"/>
<stringbundle id="bundlePreferences"
src="chrome://browser/locale/preferences/preferences.properties"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
<key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
</keyset>
<vbox class="contentPane largeDialogContainer" flex="1">
<description id="permissionsText" control="url"/>
<separator class="thin"/>
<hbox align="start">
<textbox id="searchBox" flex="1" placeholder="&searchbox.placeholder;"
<textbox id="searchBox" flex="1" data-l10n-id="permissions-searchbox"
type="search" oncommand="gSitePermissionsManager.buildPermissionsList();"/>
</hbox>
<separator class="thin"/>
@ -41,10 +43,10 @@
onkeypress="gSitePermissionsManager.onPermissionKeyPress(event);"
onselect="gSitePermissionsManager.onPermissionSelect();">
<listheader>
<treecol id="siteCol" label="&treehead.sitename2.label;" flex="3"
<treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3"
persist="width" width="50"
onclick="gSitePermissionsManager.buildPermissionsList(event.target)"/>
<treecol id="statusCol" label="&treehead.status.label;" flex="1"
<treecol id="statusCol" data-l10n-id="permissions-status" flex="1"
persist="width" width="50" data-isCurrentSortCol="true"
onclick="gSitePermissionsManager.buildPermissionsList(event.target);"/>
</listheader>
@ -53,12 +55,12 @@
<vbox>
<hbox class="actionButtons" align="left" flex="1">
<button id="removePermission" disabled="true"
accesskey="&removepermission2.accesskey;"
icon="remove" label="&removepermission2.label;"
data-l10n-id="permissions-remove"
icon="remove"
oncommand="gSitePermissionsManager.onPermissionDelete();"/>
<button id="removeAllPermissions"
icon="clear" label="&removeallpermissions2.label;"
accesskey="&removeallpermissions2.accesskey;"
data-l10n-id="permissions-remove-all"
icon="clear"
oncommand="gSitePermissionsManager.onAllPermissionsDelete();"/>
</hbox>
<spacer flex="1"/>
@ -67,9 +69,9 @@
<spacer flex="1"/>
<hbox class="actionButtons" align="right" flex="1">
<button oncommand="close();" icon="close" id="cancel"
label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
data-l10n-id="permissions-button-cancel" />
<button id="btnApplyChanges" oncommand="gSitePermissionsManager.onApplyChanges();" icon="save"
label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
data-l10n-id="permissions-button-ok" />
</hbox>
</vbox>
</window>

View File

@ -7,37 +7,40 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/translation.dtd">
<window id="TranslationDialog" class="windowDialog"
windowtype="Browser:TranslationExceptions"
title="&window.title;"
data-l10n-id="translation-window"
data-l10n-attrs="title, style"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"
onload="gTranslationExceptions.onLoad();"
onunload="gTranslationExceptions.uninit();"
persist="screenX screenY width height"
onkeypress="gTranslationExceptions.onWindowKeyPress(event);">
<link rel="localization" href="browser/preferences/translation.ftl"/>
<script type="application/javascript" src="chrome://global/content/l10n.js"></script>
<script src="chrome://browser/content/preferences/translation.js"/>
<stringbundle id="bundlePreferences"
src="chrome://browser/locale/preferences/preferences.properties"/>
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
<key data-l10n-id="translation-close-key" modifiers="accel" oncommand="window.close();"/>
</keyset>
<vbox class="largeDialogContainer">
<vbox class="contentPane" flex="1">
<label id="languagesLabel" control="permissionsTree">&noTranslationForLanguages2.label;</label>
<label id="languagesLabel"
data-l10n-id="translation-languages-disabled-desc"
control="permissionsTree"/>
<separator class="thin"/>
<tree id="languagesTree" flex="1" style="height: 12em;"
hidecolumnpicker="true"
onkeypress="gTranslationExceptions.onLanguageKeyPress(event)"
onselect="gTranslationExceptions.onLanguageSelected();">
<treecols>
<treecol id="languageCol" label="&treehead.languageName.label;" flex="1"/>
<treecol id="languageCol" data-l10n-id="translation-languages-column" flex="1"/>
</treecols>
<treechildren/>
</tree>
@ -45,26 +48,28 @@
<hbox align="end">
<hbox class="actionButtons" flex="1">
<button id="removeLanguage" disabled="true"
accesskey="&removeLanguage.accesskey;"
icon="remove" label="&removeLanguage.label;"
data-l10n-id="translation-languages-button-remove"
icon="remove"
oncommand="gTranslationExceptions.onLanguageDeleted();"/>
<button id="removeAllLanguages"
icon="clear" label="&removeAllLanguages.label;"
accesskey="&removeAllLanguages.accesskey;"
data-l10n-id="translation-languages-button-remove-all"
icon="clear"
oncommand="gTranslationExceptions.onAllLanguagesDeleted();"/>
<spacer flex="1"/>
</hbox>
</hbox>
<separator/>
<vbox class="contentPane" flex="1">
<label id="languagesLabel" control="permissionsTree">&noTranslationForSites2.label;</label>
<label id="languagesLabel"
data-l10n-id="translation-sites-disabled-desc"
control="permissionsTree"/>
<separator class="thin"/>
<tree id="sitesTree" flex="1" style="height: 12em;"
hidecolumnpicker="true"
onkeypress="gTranslationExceptions.onSiteKeyPress(event)"
onselect="gTranslationExceptions.onSiteSelected();">
<treecols>
<treecol id="siteCol" label="&treehead.siteName2.label;" flex="1"/>
<treecol id="siteCol" data-l10n-id="translation-sites-column" flex="1"/>
</treecols>
<treechildren/>
</tree>
@ -73,16 +78,16 @@
<hbox align="end">
<hbox class="actionButtons" flex="1">
<button id="removeSite" disabled="true"
accesskey="&removeSite.accesskey;"
icon="remove" label="&removeSite.label;"
data-l10n-id="translation-sites-button-remove"
icon="remove"
oncommand="gTranslationExceptions.onSiteDeleted();"/>
<button id="removeAllSites"
icon="clear" label="&removeAllSites.label;"
accesskey="&removeAllSites.accesskey;"
data-l10n-id="translation-sites-button-remove-all"
icon="clear"
oncommand="gTranslationExceptions.onAllSitesDeleted();"/>
<spacer flex="1"/>
<button oncommand="close();" icon="close"
label="&button.close.label;" accesskey="&button.close.accesskey;"/>
data-l10n-id="translation-button-close"/>
</hbox>
</hbox>
</window>

View File

@ -57,6 +57,9 @@
* version, // schema version in integer
*
* // credit card fields
* billingAddressGUID, // An optional GUID of an autofill address record
* which may or may not exist locally.
*
* cc-name,
* cc-number, // will be stored in masked format (************1234)
* // (see details below)
@ -186,6 +189,7 @@ const VALID_ADDRESS_COMPUTED_FIELDS = [
].concat(STREET_ADDRESS_COMPONENTS, TEL_COMPONENTS);
const VALID_CREDIT_CARD_FIELDS = [
"billingAddressGUID",
"cc-name",
"cc-number",
"cc-exp-month",
@ -1651,7 +1655,7 @@ class CreditCards extends AutofillRecords {
}
/**
* Normailze the given record and retrun the first matched guid if storage has the same record.
* Normalize the given record and return the first matched guid if storage has the same record.
* @param {Object} targetCreditCard
* The credit card for duplication checking.
* @returns {string|null}
@ -1713,7 +1717,7 @@ class CreditCards extends AutofillRecords {
return false;
}
if (!creditCardToMerge[field]) {
if (!creditCardToMerge[field] && typeof(existingField) != "undefined") {
creditCardToMerge[field] = existingField;
}

View File

@ -177,26 +177,32 @@ class EditCreditCard extends EditAutofillForm {
/**
* @param {HTMLElement[]} elements
* @param {object} record with a decrypted cc-number
* @param {object} addresses in an object with guid keys for the billing address picker.
* @param {object} config
* @param {function} config.isCCNumber Function to determine is a string is a valid CC number.
* @param {function} config.isCCNumber Function to determine if a string is a valid CC number.
*/
constructor(elements, record, config) {
constructor(elements, record, addresses, config) {
super(elements);
this._addresses = addresses;
Object.assign(this, config);
Object.assign(this._elements, {
ccNumber: this._elements.form.querySelector("#cc-number"),
year: this._elements.form.querySelector("#cc-exp-year"),
billingAddress: this._elements.form.querySelector("#billingAddressGUID"),
billingAddressRow: this._elements.form.querySelector(".billingAddressRow"),
});
this.loadRecord(record);
this.loadRecord(record, addresses);
this.attachEventListeners();
}
loadRecord(record) {
// _record must be updated before generateYears is called.
loadRecord(record, addresses) {
// _record must be updated before generateYears and generateBillingAddressOptions are called.
this._record = record;
this._addresses = addresses;
this.generateYears();
this.generateBillingAddressOptions();
super.loadRecord(record);
}
@ -223,6 +229,24 @@ class EditCreditCard extends EditAutofillForm {
}
}
generateBillingAddressOptions() {
let billingAddressGUID = this._record && this._record.billingAddressGUID;
this._elements.billingAddress.textContent = "";
this._elements.billingAddress.appendChild(new Option("", ""));
let hasAddresses = false;
for (let [guid, address] of Object.entries(this._addresses)) {
hasAddresses = true;
let selected = guid == billingAddressGUID;
let option = new Option(this.getAddressLabel(address), guid, selected, selected);
this._elements.billingAddress.appendChild(option);
}
this._elements.billingAddressRow.hidden = !hasAddresses;
}
attachEventListeners() {
this._elements.ccNumber.addEventListener("change", this);
super.attachEventListeners();

View File

@ -47,6 +47,11 @@
<option/>
</select>
</div>
<label class="billingAddressRow">
<span data-localization="billingAddress"/>
<select id="billingAddressGUID">
</select>
</label>
</form>
<div id="controls-container">
<button id="cancel" data-localization="cancelBtnLabel"/>
@ -56,15 +61,21 @@
"use strict";
let {
getAddressLabel,
isCCNumber,
} = FormAutofillUtils;
let record = window.arguments && window.arguments[0];
let addresses = {};
for (let address of formAutofillStorage.addresses.getAll()) {
addresses[address.guid] = address;
}
/* import-globals-from autofillEditForms.js */
let fieldContainer = new EditCreditCard({
form: document.getElementById("form"),
}, record,
}, record, addresses,
{
getAddressLabel: getAddressLabel.bind(FormAutofillUtils),
isCCNumber: isCCNumber.bind(FormAutofillUtils),
});

View File

@ -138,3 +138,4 @@ editCreditCardTitle = Edit Credit Card
cardNumber = Card Number
nameOnCard = Name on Card
cardExpires = Expires
billingAddress = Billing Address

View File

@ -13,6 +13,7 @@ form > div {
margin: 0 0 0.5em !important;
}
#billingAddressGUID,
input {
flex: 1 0 auto;
}

View File

@ -2,53 +2,38 @@
"use strict";
add_task(async function setup() {
let {formAutofillStorage} = ChromeUtils.import("resource://formautofill/FormAutofillStorage.jsm", {});
await formAutofillStorage.initialize();
});
add_task(async function test_cancelEditCreditCardDialog() {
await new Promise(resolve => {
let win = window.openDialog(EDIT_CREDIT_CARD_DIALOG_URL);
waitForFocus(() => {
win.addEventListener("unload", () => {
ok(true, "Edit credit card dialog is closed");
resolve();
}, {once: true});
win.document.querySelector("#cancel").click();
}, win);
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
win.document.querySelector("#cancel").click();
});
});
add_task(async function test_cancelEditCreditCardDialogWithESC() {
await new Promise(resolve => {
let win = window.openDialog(EDIT_CREDIT_CARD_DIALOG_URL);
waitForFocus(() => {
win.addEventListener("unload", () => {
ok(true, "Edit credit card dialog is closed with ESC key");
resolve();
}, {once: true});
EventUtils.synthesizeKey("VK_ESCAPE", {}, win);
}, win);
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
EventUtils.synthesizeKey("VK_ESCAPE", {}, win);
});
});
add_task(async function test_saveCreditCard() {
await new Promise(resolve => {
let win = window.openDialog(EDIT_CREDIT_CARD_DIALOG_URL);
waitForFocus(() => {
win.addEventListener("unload", () => {
ok(true, "Edit credit card dialog is closed");
resolve();
}, {once: true});
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_1["cc-number"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_1["cc-name"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("0" + TEST_CREDIT_CARD_1["cc-exp-month"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_1["cc-exp-year"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
info("saving credit card");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
}, win);
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_1["cc-number"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_1["cc-name"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("0" + TEST_CREDIT_CARD_1["cc-exp-month"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_1["cc-exp-year"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
info("saving credit card");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
});
let creditCards = await getCreditCards();
@ -59,34 +44,29 @@ add_task(async function test_saveCreditCard() {
}
is(creditCards[0][fieldName], fieldValue, "check " + fieldName);
}
is(creditCards[0].billingAddressGUID, undefined, "check billingAddressGUID");
ok(creditCards[0]["cc-number-encrypted"], "cc-number-encrypted exists");
});
add_task(async function test_saveCreditCardWithMaxYear() {
await new Promise(resolve => {
let win = window.openDialog(EDIT_CREDIT_CARD_DIALOG_URL);
waitForFocus(() => {
win.addEventListener("unload", () => {
ok(true, "Edit credit card dialog is closed");
resolve();
}, {once: true});
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-number"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-name"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-exp-month"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-exp-year"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
info("saving credit card");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
}, win);
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-number"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-name"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-exp-month"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD_2["cc-exp-year"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
info("saving credit card");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
});
let creditCards = await getCreditCards();
is(creditCards.length, 2, "Two credit card is in storage");
is(creditCards.length, 2, "Two credit cards are in storage");
for (let [fieldName, fieldValue] of Object.entries(TEST_CREDIT_CARD_2)) {
if (fieldName === "cc-number") {
fieldValue = "*".repeat(fieldValue.length - 4) + fieldValue.substr(-4);
@ -97,18 +77,60 @@ add_task(async function test_saveCreditCardWithMaxYear() {
await removeCreditCards([creditCards[1].guid]);
});
add_task(async function test_saveCreditCardWithBillingAddress() {
await saveAddress(TEST_ADDRESS_4);
await saveAddress(TEST_ADDRESS_1);
let addresses = await getAddresses();
let billingAddress = addresses[0];
const TEST_CREDIT_CARD = Object.assign({}, TEST_CREDIT_CARD_2, {
billingAddressGUID: billingAddress.guid,
});
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD["cc-number"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD["cc-name"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD["cc-exp-month"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(TEST_CREDIT_CARD["cc-exp-year"].toString(), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey(billingAddress["given-name"], {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
info("saving credit card");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
});
let creditCards = await getCreditCards();
is(creditCards.length, 2, "Two credit cards are in storage");
for (let [fieldName, fieldValue] of Object.entries(TEST_CREDIT_CARD)) {
if (fieldName === "cc-number") {
fieldValue = "*".repeat(fieldValue.length - 4) + fieldValue.substr(-4);
}
is(creditCards[1][fieldName], fieldValue, "check " + fieldName);
}
ok(creditCards[1].billingAddressGUID, "billingAddressGUID is truthy");
ok(creditCards[1]["cc-number-encrypted"], "cc-number-encrypted exists");
await removeCreditCards([creditCards[1].guid]);
await removeAddresses([
addresses[0].guid,
addresses[1].guid,
]);
});
add_task(async function test_editCreditCard() {
let creditCards = await getCreditCards();
is(creditCards.length, 1, "only one credit card is in storage");
let win = window.openDialog(EDIT_CREDIT_CARD_DIALOG_URL, null, null, creditCards[0]);
await waitForFocusAndFormReady(win);
let unloadPromise = BrowserTestUtils.waitForEvent(win, "unload");
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_RIGHT", {}, win);
EventUtils.synthesizeKey("test", {}, win);
win.document.querySelector("#save").click();
await unloadPromise;
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_RIGHT", {}, win);
EventUtils.synthesizeKey("test", {}, win);
win.document.querySelector("#save").click();
}, creditCards[0]);
ok(true, "Edit credit card dialog is closed");
creditCards = await getCreditCards();
@ -120,25 +142,51 @@ add_task(async function test_editCreditCard() {
is(creditCards.length, 0, "Credit card storage is empty");
});
add_task(async function test_editCreditCardWithMissingBillingAddress() {
const TEST_CREDIT_CARD = Object.assign({}, TEST_CREDIT_CARD_2, {
billingAddressGUID: "unknown-guid",
});
await saveCreditCard(TEST_CREDIT_CARD);
let creditCards = await getCreditCards();
is(creditCards.length, 1, "one credit card in storage");
is(creditCards[0].billingAddressGUID, TEST_CREDIT_CARD.billingAddressGUID,
"Check saved billingAddressGUID");
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("VK_RIGHT", {}, win);
EventUtils.synthesizeKey("test", {}, win);
win.document.querySelector("#save").click();
}, creditCards[0]);
ok(true, "Edit credit card dialog is closed");
creditCards = await getCreditCards();
is(creditCards.length, 1, "only one credit card is in storage");
is(creditCards[0]["cc-name"], TEST_CREDIT_CARD["cc-name"] + "test", "cc name changed");
is(creditCards[0].billingAddressGUID, undefined,
"unknown GUID removed upon manual save");
await removeCreditCards([creditCards[0].guid]);
creditCards = await getCreditCards();
is(creditCards.length, 0, "Credit card storage is empty");
});
add_task(async function test_addInvalidCreditCard() {
await new Promise(resolve => {
let win = window.openDialog(EDIT_CREDIT_CARD_DIALOG_URL);
waitForFocus(() => {
const unloadHandler = () => ok(false, "Edit credit card dialog shouldn't be closed");
win.addEventListener("unload", unloadHandler);
await testDialog(EDIT_CREDIT_CARD_DIALOG_URL, (win) => {
const unloadHandler = () => ok(false, "Edit credit card dialog shouldn't be closed");
win.addEventListener("unload", unloadHandler);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("test", {}, win);
EventUtils.synthesizeMouseAtCenter(win.document.querySelector("#save"), {}, win);
EventUtils.synthesizeKey("VK_TAB", {}, win);
EventUtils.synthesizeKey("test", {}, win);
EventUtils.synthesizeMouseAtCenter(win.document.querySelector("#save"), {}, win);
is(win.document.querySelector("form").checkValidity(), false, "cc-number is invalid");
SimpleTest.requestFlakyTimeout("Ensure the window remains open after save attempt");
setTimeout(() => {
win.removeEventListener("unload", unloadHandler);
win.close();
resolve();
}, 500);
}, win);
is(win.document.querySelector("form").checkValidity(), false, "cc-number is invalid");
SimpleTest.requestFlakyTimeout("Ensure the window remains open after save attempt");
setTimeout(() => {
win.removeEventListener("unload", unloadHandler);
win.close();
}, 500);
});
let creditCards = await getCreditCards();

View File

@ -338,7 +338,7 @@ async function waitForFocusAndFormReady(win) {
]);
}
async function testDialog(url, testFn, arg) {
async function testDialog(url, testFn, arg = undefined) {
let win = window.openDialog(url, null, "width=600,height=600", arg);
await waitForFocusAndFormReady(win);
let unloadPromise = BrowserTestUtils.waitForEvent(win, "unload");

View File

@ -36,7 +36,14 @@ const TEST_CREDIT_CARD_4 = {
"cc-number": "9999888877776666",
};
const TEST_CREDIT_CARD_WITH_BILLING_ADDRESS = {
"cc-name": "J. Smith",
"cc-number": "4111111111111111",
billingAddressGUID: "9m6hf4gfr6ge",
};
const TEST_CREDIT_CARD_WITH_EMPTY_FIELD = {
billingAddressGUID: "",
"cc-name": "",
"cc-number": "1234123412341234",
"cc-exp-month": 1,
@ -106,6 +113,20 @@ const MERGE_TESTCASES = [
"cc-exp-year": 2017,
},
},
{
description: "Merge a superset with billingAddressGUID",
creditCardInStorage: {
"cc-number": "1234567812345678",
},
creditCardToMerge: {
"cc-number": "1234567812345678",
billingAddressGUID: "ijsnbhfr",
},
expectedCreditCard: {
"cc-number": "1234567812345678",
billingAddressGUID: "ijsnbhfr",
},
},
{
description: "Merge a subset",
creditCardInStorage: {
@ -127,6 +148,21 @@ const MERGE_TESTCASES = [
},
noNeedToUpdate: true,
},
{
description: "Merge a subset with billingAddressGUID",
creditCardInStorage: {
"cc-number": "1234567812345678",
billingAddressGUID: "8fhdb3ug6",
},
creditCardToMerge: {
"cc-number": "1234567812345678",
},
expectedCreditCard: {
billingAddressGUID: "8fhdb3ug6",
"cc-number": "1234567812345678",
},
noNeedToUpdate: true,
},
{
description: "Merge an creditCard with partial overlaps",
creditCardInStorage: {
@ -274,6 +310,7 @@ add_task(async function test_add() {
let creditCard = profileStorage.creditCards._data[2];
Assert.equal(creditCard["cc-exp-month"], TEST_CREDIT_CARD_WITH_EMPTY_FIELD["cc-exp-month"]);
Assert.equal(creditCard["cc-name"], undefined);
Assert.equal(creditCard.billingAddressGUID, undefined);
// Empty computed fields shouldn't cause any problem.
profileStorage.creditCards.add(TEST_CREDIT_CARD_WITH_EMPTY_COMPUTED_FIELD);
@ -291,6 +328,22 @@ add_task(async function test_add() {
/Record contains no valid field\./);
});
add_task(async function test_addWithBillingAddress() {
let path = getTempFile(TEST_STORE_FILE_NAME).path;
let profileStorage = new FormAutofillStorage(path);
await profileStorage.initialize();
let creditCards = profileStorage.creditCards.getAll();
Assert.equal(creditCards.length, 0);
await profileStorage.creditCards.add(TEST_CREDIT_CARD_WITH_BILLING_ADDRESS);
creditCards = profileStorage.creditCards.getAll();
Assert.equal(creditCards.length, 1);
do_check_credit_card_matches(creditCards[0], TEST_CREDIT_CARD_WITH_BILLING_ADDRESS);
});
add_task(async function test_update() {
// Test assumes that when an entry is saved a second time, it's last modified date will
// be different from the first. With high values of precision reduction, we execute too
@ -338,6 +391,7 @@ add_task(async function test_update() {
creditCard = profileStorage.creditCards._data[0];
Assert.equal(creditCard["cc-exp-month"], TEST_CREDIT_CARD_WITH_EMPTY_FIELD["cc-exp-month"]);
Assert.equal(creditCard["cc-name"], undefined);
Assert.equal(creditCard.billingAddressGUID, undefined);
// Empty computed fields shouldn't cause any problem.
profileStorage.creditCards.update(profileStorage.creditCards._data[0].guid, TEST_CREDIT_CARD_WITH_EMPTY_COMPUTED_FIELD, false);

View File

@ -14,6 +14,7 @@ DIRS += [
'pocket',
'screenshots',
'webcompat',
'webcompat-reporter'
]
# Only include the following system add-ons if building Aurora or Nightly
@ -22,12 +23,6 @@ if not CONFIG['RELEASE_OR_BETA']:
'presentation',
]
# Only include the following system add-ons if building DevEdition or Nightly
if CONFIG['MOZ_DEV_EDITION'] or CONFIG['NIGHTLY_BUILD']:
DIRS += [
'webcompat-reporter',
]
# Only include mortar system add-ons if we locally enable it
if CONFIG['MOZ_MORTAR']:
DIRS += [

View File

@ -0,0 +1,27 @@
# 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/.
app-manager-window =
.title = Application details
.style = width: 30em; min-height: 20em;
app-manager-remove =
.label = Remove
.accesskey = R
app-manager-handle-webfeeds = The following applications can be used to handle Web Feeds.
# Variables:
# $type (String) - the URI scheme of the link (e.g. mailto:)
app-manager-handle-protocol = The following applications can be used to handle { $type } links.
# Variables:
# $type (String) - the MIME type (e.g. application/binary)
app-manager-handle-file = The following applications can be used to handle { $type } content.
## These strings are followed, on a new line,
## by the URL or path of the application.
app-manager-web-app-info = This web application is hosted at:
app-manager-local-app-info = This application is located at:

View File

@ -0,0 +1,22 @@
# 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/.
blocklist-window =
.title = Block Lists
.style = width: 55em
blocklist-desc = You can choose which list { -brand-short-name } will use to block Web elements that may track your browsing activity.
blocklist-close-key =
.key = w
blocklist-treehead-list =
.label = List
blocklist-button-cancel =
.label = Cancel
.accesskey = C
blocklist-button-ok =
.label = Save Changes
.accesskey = S

View File

@ -0,0 +1,30 @@
# 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/.
clear-site-data-window =
.title = Clear Data
.style = width: 35em
clear-site-data-description = Clearing all cookies and site data stored by { -brand-short-name } may sign you out of websites and remove offline web content. Clearing cache data will not affect your logins.
clear-site-data-close-key =
.key = w
clear-site-data-cookies = Cookies and Site Data
.accesskey = S
clear-site-data-cookies-info = You may get signed out of websites if cleared
clear-site-data-cache = Cached Web Content
.accesskey = W
clear-site-data-cache-info = Will require websites to reload images and data
clear-site-data-cancel =
.label = Cancel
.accesskey = C
clear-site-data-clear =
.label = Clear
.accesskey = l

View File

@ -0,0 +1,48 @@
# 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/.
colors-window =
.title = Colors
.style =
{ PLATFORM() ->
[macos] width: 41em
*[other] width: 38em
}
colors-close-key =
.key = w
colors-page-override = Override the colors specified by the page with your selections above
.accesskey = O
colors-page-override-option-always =
.label = Always
colors-page-override-option-auto =
.label = Only with High Contrast themes
colors-page-override-option-never =
.label = Never
colors-text-and-background = Text and Background
colors-text-header = Text
.accesskey = T
colors-background = Background
.accesskey = B
colors-use-system =
.label = Use system colors
.accesskey = s
colors-underline-links =
.label = Underline links
.accesskey = U
colors-links-header = Link Colors
colors-unvisited-links = Unvisited Links
.accesskey = L
colors-visited-links = Visited Links
.accesskey = V

View File

@ -0,0 +1,83 @@
# 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/.
connection-window =
.title = Connection Settings
.style =
{ PLATFORM() ->
[macos] width: 44em
*[other] width: 49em
}
connection-close-key =
.key = w
connection-disable-extension =
.label = Disable Extension
connection-proxy-configure = Configure Proxy Access to the Internet
connection-proxy-option-no =
.label = No proxy
.accesskey = y
connection-proxy-option-system =
.label = Use system proxy settings
.accesskey = U
connection-proxy-option-auto =
.label = Auto-detect proxy settings for this network
.accesskey = w
connection-proxy-option-manual =
.label = Manual proxy configuration
.accesskey = M
connection-proxy-http = HTTP Proxy
.accesskey = x
connection-proxy-http-port = Port
.accesskey = P
connection-proxy-http-share =
.label = Use this proxy server for all protocols
.accesskey = s
connection-proxy-ssl = SSL Proxy
.accesskey = L
connection-proxy-ssl-port = Port
.accesskey = o
connection-proxy-ftp = FTP Proxy
.accesskey = F
connection-proxy-ftp-port = Port
.accesskey = r
connection-proxy-socks = SOCKS Host
.accesskey = C
connection-proxy-socks-port = Port
.accesskey = t
connection-proxy-socks4 =
.label = SOCKS v4
.accesskey = K
connection-proxy-socks5 =
.label = SOCKS v5
.accesskey = v
connection-proxy-noproxy = No Proxy for
.accesskey = N
connection-proxy-noproxy-desc = Example: .mozilla.org, .net.nz, 192.168.1.0/24
connection-proxy-autotype =
.label = Automatic proxy configuration URL
.accesskey = A
connection-proxy-reload =
.label = Reload
.accesskey = e
connection-proxy-autologin =
.label = Do not prompt for authentication if password is saved
.accesskey = i
.tooltip = This option silently authenticates you to proxies when you have saved credentials for them. You will be prompted if authentication fails.
connection-proxy-socks-remote-dns =
.label = Proxy DNS when using SOCKS v5
.accesskey = D

View File

@ -0,0 +1,153 @@
# 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/.
fonts-window =
.title = Fonts
fonts-window-close =
.key = w
## Font groups by language
fonts-langgroup-header = Fonts for
.accesskey = F
fonts-langgroup-arabic =
.label = Arabic
fonts-langgroup-armenian =
.label = Armenian
fonts-langgroup-bengali =
.label = Bengali
fonts-langgroup-simpl-chinese =
.label = Simplified Chinese
fonts-langgroup-trad-chinese-hk =
.label = Traditional Chinese (Hong Kong)
fonts-langgroup-trad-chinese =
.label = Traditional Chinese (Taiwan)
fonts-langgroup-cyrillic =
.label = Cyrillic
fonts-langgroup-devanagari =
.label = Devanagari
fonts-langgroup-ethiopic =
.label = Ethiopic
fonts-langgroup-georgian =
.label = Georgian
fonts-langgroup-el =
.label = Greek
fonts-langgroup-gujarati =
.label = Gujarati
fonts-langgroup-gurmukhi =
.label = Gurmukhi
fonts-langgroup-japanese =
.label = Japanese
fonts-langgroup-hebrew =
.label = Hebrew
fonts-langgroup-kannada =
.label = Kannada
fonts-langgroup-khmer =
.label = Khmer
fonts-langgroup-korean =
.label = Korean
# Translate "Latin" as the name of Latin (Roman) script, not as the name of the Latin language.
fonts-langgroup-latin =
.label = Latin
fonts-langgroup-malayalam =
.label = Malayalam
fonts-langgroup-math =
.label = Mathematics
fonts-langgroup-odia =
.label = Odia
fonts-langgroup-sinhala =
.label = Sinhala
fonts-langgroup-tamil =
.label = Tamil
fonts-langgroup-telugu =
.label = Telugu
fonts-langgroup-thai =
.label = Thai
fonts-langgroup-tibetan =
.label = Tibetan
fonts-langgroup-canadian =
.label = Unified Canadian Syllabary
fonts-langgroup-other =
.label = Other Writing Systems
## Default fonts and their sizes
fonts-proportional-header = Proportional
.accesskey = P
fonts-default-serif =
.label = Serif
fonts-default-sans-serif =
.label = Sans Serif
fonts-proportional-size = Size
.accesskey = z
fonts-serif = Serif
.accesskey = S
fonts-sans-serif = Sans-serif
.accesskey = n
fonts-monospace = Monospace
.accesskey = M
fonts-monospace-size = Size
.accesskey = e
fonts-minsize = Minimum font size
.accesskey = o
fonts-minsize-none =
.label = None
fonts-allow-own =
.label = Allow pages to choose their own fonts, instead of your selections above
.accesskey = A
## Text Encodings
##
## Translate the encoding names as adjectives for an encoding, not as the name
## of the language.
fonts-languages-fallback-header = Text Encoding for Legacy Content
fonts-languages-fallback-desc = This text encoding is used for legacy content that fails to declare its encoding.
fonts-languages-fallback-label = Fallback Text Encoding
.accesskey = T
fonts-languages-fallback-name-auto =
.label = Default for Current Locale
fonts-languages-fallback-name-arabic =
.label = Arabic
fonts-languages-fallback-name-baltic =
.label = Baltic
fonts-languages-fallback-name-ceiso =
.label = Central European, ISO
fonts-languages-fallback-name-cewindows =
.label = Central European, Microsoft
fonts-languages-fallback-name-simplified =
.label = Chinese, Simplified
fonts-languages-fallback-name-traditional =
.label = Chinese, Traditional
fonts-languages-fallback-name-cyrillic =
.label = Cyrillic
fonts-languages-fallback-name-greek =
.label = Greek
fonts-languages-fallback-name-hebrew =
.label = Hebrew
fonts-languages-fallback-name-japanese =
.label = Japanese
fonts-languages-fallback-name-korean =
.label = Korean
fonts-languages-fallback-name-thai =
.label = Thai
fonts-languages-fallback-name-turkish =
.label = Turkish
fonts-languages-fallback-name-vietnamese =
.label = Vietnamese
fonts-languages-fallback-name-other =
.label = Other (incl. Western European)

View File

@ -0,0 +1,34 @@
# 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/.
languages-window =
.title = Languages
.style = width: 30em
languages-close-key =
.key = w
languages-description = Web pages are sometimes offered in more than one language. Choose languages for displaying these web pages, in order of preference
languages-customize-spoof-english =
.label = Request English versions of web pages for enhanced privacy
languages-customize-moveup =
.label = Move Up
.accesskey = U
languages-customize-movedown =
.label = Move Down
.accesskey = D
languages-customize-remove =
.label = Remove
.accesskey = R
languages-customize-select-language =
.placeholder = Select a language to add…
languages-customize-add =
.label = Add
.accesskey = A

View File

@ -0,0 +1,50 @@
# 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/.
permissions-window =
.title = Exceptions
.style = width: 45em
permissions-close-key =
.key = w
permissions-address = Address of website
.accesskey = d
permissions-block =
.label = Block
.accesskey = B
permissions-session =
.label = Allow for Session
.accesskey = S
permissions-allow =
.label = Allow
.accesskey = A
permissions-site-name =
.label = Website
permissions-status =
.label = Status
permissions-remove =
.label = Remove Website
.accesskey = R
permissions-remove-all =
.label = Remove All Websites
.accesskey = e
permissions-button-cancel =
.label = Cancel
.accesskey = C
permissions-button-ok =
.label = Save Changes
.accesskey = S
permissions-searchbox =
.placeholder = Search Website

View File

@ -0,0 +1,9 @@
# 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/.
select-bookmark-window =
.title = Set Home Page
.style = width: 32em;
select-bookmark-desc = Choose a Bookmark to be your Home Page. If you choose a folder, the Bookmarks in that folder will be opened in Tabs.

View File

@ -0,0 +1,45 @@
# 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/.
## Settings
site-data-settings-window =
.title = Manage Cookies and Site Data
site-data-search-textbox =
.placeholder = Search websites
.accesskey = S
site-data-column-host =
.label = Site
site-data-column-cookies =
.label = Cookies
site-data-column-storage =
.label = Storage
site-data-column-last-used =
.label = Last Used
site-data-remove-selected =
.label = Remove Selected
.accesskey = R
site-data-button-cancel =
.label = Cancel
.accesskey = C
site-data-button-save =
.label = Save Changes
.accesskey = a
## Removing
site-data-removing-window =
.title = { site-data-removing-header }
site-data-removing-header = Removing Cookies and Site Data
site-data-removing-desc = Removing cookies and site data may log you out of websites. Are you sure you want to make the changes?
site-data-removing-table = Cookies and site data for the following websites will be removed

View File

@ -0,0 +1,40 @@
# 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/.
translation-window =
.title = Exceptions - Translation
.style = width: 36em
translation-close-key =
.key = w
translation-languages-disabled-desc = Translation will not be offered for the following languages
translation-languages-column =
.label = Languages
translation-languages-button-remove =
.label = Remove Language
.accesskey = R
translation-languages-button-remove-all =
.label = Remove All Languages
.accesskey = e
translation-sites-disabled-desc = Translation will not be offered for the following sites
translation-sites-column =
.label = Websites
translation-sites-button-remove =
.label = Remove Site
.accesskey = S
translation-sites-button-remove-all =
.label = Remove All Sites
.accesskey = i
translation-button-close =
.label = Close
.accesskey = C

View File

@ -1,8 +0,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/. -->
<!ENTITY appManager.title "Application details">
<!ENTITY appManager.style "width: 30em; min-height: 20em;">
<!ENTITY remove.label "Remove">
<!ENTITY remove.accesskey "R">

View File

@ -1,14 +0,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/.
# LOCALIZATION NOTE
# in descriptionApplications, %S will be replaced by one of the 3 following strings
descriptionApplications=The following applications can be used to handle %S.
handleProtocol=%S links
handleWebFeeds=Web Feeds
handleFile=%S content
descriptionWebApp=This web application is hosted at:
descriptionLocalApp=This application is located at:

View File

@ -1,14 +0,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/. -->
<!ENTITY window.title "Block Lists">
<!ENTITY window.width "55em">
<!ENTITY treehead.list.label "List">
<!ENTITY windowClose.key "w">
<!ENTITY button.cancel.label "Cancel">
<!ENTITY button.cancel.accesskey "C">
<!ENTITY button.ok.label "Save Changes">
<!ENTITY button.ok.accesskey "S">

View File

@ -1,22 +0,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/. -->
<!ENTITY window.title "Clear Data">
<!ENTITY window.width "35em">
<!ENTITY window.description "Clearing all cookies and site data stored by &brandShortName; may sign you out of websites and remove offline web content. Clearing cache data will not affect your logins.">
<!ENTITY windowClose.key "w">
<!ENTITY clearSiteData.label "Cookies and Site Data">
<!ENTITY clearSiteData.accesskey "S">
<!ENTITY clearSiteData.description "You may get signed out of websites if cleared">
<!ENTITY clearCache.label "Cached Web Content">
<!ENTITY clearCache.accesskey "W">
<!ENTITY clearCache.description "Will require websites to reload images and data">
<!ENTITY button.cancel.label "Cancel">
<!ENTITY button.cancel.accesskey "C">
<!ENTITY button.clear.label "Clear">
<!ENTITY button.clear.accesskey "l">

View File

@ -1,30 +0,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/. -->
<!ENTITY colorsDialog.title "Colors">
<!ENTITY window.width "38em">
<!ENTITY window.macWidth "41em">
<!ENTITY overrideDefaultPageColors2.label "Override the colors specified by the page with your selections above">
<!ENTITY overrideDefaultPageColors2.accesskey "O">
<!ENTITY overrideDefaultPageColors.always.label "Always">
<!ENTITY overrideDefaultPageColors.auto.label "Only with High Contrast themes">
<!ENTITY overrideDefaultPageColors.never.label "Never">
<!ENTITY color "Text and Background">
<!ENTITY textColor2.label "Text">
<!ENTITY textColor2.accesskey "T">
<!ENTITY backgroundColor2.label "Background">
<!ENTITY backgroundColor2.accesskey "B">
<!ENTITY useSystemColors.label "Use system colors">
<!ENTITY useSystemColors.accesskey "s">
<!ENTITY underlineLinks.label "Underline links">
<!ENTITY underlineLinks.accesskey "U">
<!ENTITY links "Link Colors">
<!ENTITY linkColor2.label "Unvisited Links">
<!ENTITY linkColor2.accesskey "L">
<!ENTITY visitedLinkColor2.label "Visited Links">
<!ENTITY visitedLinkColor2.accesskey "V">

View File

@ -1,49 +0,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/. -->
<!ENTITY connectionsDialog.title "Connection Settings">
<!ENTITY window.width2 "49em">
<!ENTITY window.macWidth2 "44em">
<!ENTITY proxyTitle.label2 "Configure Proxy Access to the Internet">
<!ENTITY noProxyTypeRadio.label "No proxy">
<!ENTITY noProxyTypeRadio.accesskey "y">
<!ENTITY systemTypeRadio.label "Use system proxy settings">
<!ENTITY systemTypeRadio.accesskey "u">
<!ENTITY WPADTypeRadio.label "Auto-detect proxy settings for this network">
<!ENTITY WPADTypeRadio.accesskey "w">
<!ENTITY manualTypeRadio2.label "Manual proxy configuration">
<!ENTITY manualTypeRadio2.accesskey "m">
<!ENTITY autoTypeRadio2.label "Automatic proxy configuration URL">
<!ENTITY autoTypeRadio2.accesskey "A">
<!ENTITY reload.label "Reload">
<!ENTITY reload.accesskey "e">
<!ENTITY ftp2.label "FTP Proxy">
<!ENTITY ftp2.accesskey "F">
<!ENTITY http2.label "HTTP Proxy">
<!ENTITY http2.accesskey "x">
<!ENTITY ssl2.label "SSL Proxy">
<!ENTITY ssl2.accesskey "L">
<!ENTITY socks2.label "SOCKS Host">
<!ENTITY socks2.accesskey "C">
<!ENTITY socks4.label "SOCKS v4">
<!ENTITY socks4.accesskey "K">
<!ENTITY socks5.label "SOCKS v5">
<!ENTITY socks5.accesskey "v">
<!ENTITY socksRemoteDNS.label2 "Proxy DNS when using SOCKS v5">
<!ENTITY socksRemoteDNS.accesskey "d">
<!ENTITY port2.label "Port">
<!ENTITY HTTPport.accesskey "P">
<!ENTITY SSLport.accesskey "o">
<!ENTITY FTPport.accesskey "r">
<!ENTITY SOCKSport.accesskey "t">
<!ENTITY noproxy2.label "No Proxy for">
<!ENTITY noproxy2.accesskey "n">
<!ENTITY noproxyExplain.label "Example: .mozilla.org, .net.nz, 192.168.1.0/24">
<!ENTITY shareproxy.label "Use this proxy server for all protocols">
<!ENTITY shareproxy.accesskey "s">
<!ENTITY autologinproxy.label "Do not prompt for authentication if password is saved">
<!ENTITY autologinproxy.accesskey "i">
<!ENTITY autologinproxy.tooltip "This option silently authenticates you to proxies when you have saved credentials for them. You will be prompted if authentication fails.">

View File

@ -1,107 +0,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/. -->
<!ENTITY fontsDialog.title "Fonts">
<!ENTITY fonts.label "Fonts for">
<!ENTITY fonts.accesskey "F">
<!ENTITY size2.label "Size">
<!ENTITY sizeProportional.accesskey "z">
<!ENTITY sizeMonospace.accesskey "e">
<!ENTITY proportional2.label "Proportional">
<!ENTITY proportional2.accesskey "P">
<!ENTITY serif2.label "Serif">
<!ENTITY serif2.accesskey "S">
<!ENTITY sans-serif2.label "Sans-serif">
<!ENTITY sans-serif2.accesskey "n">
<!ENTITY monospace2.label "Monospace">
<!ENTITY monospace2.accesskey "M">
<!-- LOCALIZATION NOTE (font.langGroup.latin) :
Translate "Latin" as the name of Latin (Roman) script, not as the name of the Latin language. -->
<!ENTITY font.langGroup.latin "Latin">
<!ENTITY font.langGroup.japanese "Japanese">
<!ENTITY font.langGroup.trad-chinese "Traditional Chinese (Taiwan)">
<!ENTITY font.langGroup.simpl-chinese "Simplified Chinese">
<!ENTITY font.langGroup.trad-chinese-hk "Traditional Chinese (Hong Kong)">
<!ENTITY font.langGroup.korean "Korean">
<!ENTITY font.langGroup.cyrillic "Cyrillic">
<!ENTITY font.langGroup.el "Greek">
<!ENTITY font.langGroup.other "Other Writing Systems">
<!ENTITY font.langGroup.thai "Thai">
<!ENTITY font.langGroup.hebrew "Hebrew">
<!ENTITY font.langGroup.arabic "Arabic">
<!ENTITY font.langGroup.devanagari "Devanagari">
<!ENTITY font.langGroup.tamil "Tamil">
<!ENTITY font.langGroup.armenian "Armenian">
<!ENTITY font.langGroup.bengali "Bengali">
<!ENTITY font.langGroup.canadian "Unified Canadian Syllabary">
<!ENTITY font.langGroup.ethiopic "Ethiopic">
<!ENTITY font.langGroup.georgian "Georgian">
<!ENTITY font.langGroup.gujarati "Gujarati">
<!ENTITY font.langGroup.gurmukhi "Gurmukhi">
<!ENTITY font.langGroup.khmer "Khmer">
<!ENTITY font.langGroup.malayalam "Malayalam">
<!ENTITY font.langGroup.math "Mathematics">
<!ENTITY font.langGroup.odia "Odia">
<!ENTITY font.langGroup.telugu "Telugu">
<!ENTITY font.langGroup.kannada "Kannada">
<!ENTITY font.langGroup.sinhala "Sinhala">
<!ENTITY font.langGroup.tibetan "Tibetan">
<!-- Minimum font size -->
<!ENTITY minSize2.label "Minimum font size">
<!ENTITY minSize2.accesskey "o">
<!ENTITY minSize.none "None">
<!-- default font type -->
<!ENTITY useDefaultFontSerif.label "Serif">
<!ENTITY useDefaultFontSansSerif.label "Sans Serif">
<!ENTITY allowPagesToUseOwn.label "Allow pages to choose their own fonts, instead of your selections above">
<!ENTITY allowPagesToUseOwn.accesskey "A">
<!ENTITY languages.customize.Fallback2.grouplabel "Text Encoding for Legacy Content">
<!ENTITY languages.customize.Fallback3.label "Fallback Text Encoding">
<!ENTITY languages.customize.Fallback3.accesskey "T">
<!ENTITY languages.customize.Fallback2.desc "This text encoding is used for legacy content that fails to declare its encoding.">
<!ENTITY languages.customize.Fallback.auto "Default for Current Locale">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.arabic):
Translate "Arabic" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.arabic "Arabic">
<!ENTITY languages.customize.Fallback.baltic "Baltic">
<!ENTITY languages.customize.Fallback.ceiso "Central European, ISO">
<!ENTITY languages.customize.Fallback.cewindows "Central European, Microsoft">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.simplified):
Translate "Chinese" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.simplified "Chinese, Simplified">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.traditional):
Translate "Chinese" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.traditional "Chinese, Traditional">
<!ENTITY languages.customize.Fallback.cyrillic "Cyrillic">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.greek):
Translate "Greek" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.greek "Greek">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.hebrew):
Translate "Hebrew" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.hebrew "Hebrew">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.japanese):
Translate "Japanese" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.japanese "Japanese">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.korean):
Translate "Korean" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.korean "Korean">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.thai):
Translate "Thai" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.thai "Thai">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.turkish):
Translate "Turkish" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.turkish "Turkish">
<!-- LOCALIZATION NOTE (languages.customize.Fallback.vietnamese):
Translate "Vietnamese" as an adjective for an encoding, not as the name of the language. -->
<!ENTITY languages.customize.Fallback.vietnamese "Vietnamese">
<!ENTITY languages.customize.Fallback.other "Other (incl. Western European)">

View File

@ -1,18 +0,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/. -->
<!ENTITY window.width "30em">
<!ENTITY languages.customize.Header "Languages">
<!ENTITY languages.customize2.description "Web pages are sometimes offered in more than one language. Choose languages for displaying these web pages, in order of preference">
<!ENTITY languages.customize.moveUp.label "Move Up">
<!ENTITY languages.customize.moveUp.accesskey "U">
<!ENTITY languages.customize.moveDown.label "Move Down">
<!ENTITY languages.customize.moveDown.accesskey "D">
<!ENTITY languages.customize.deleteButton.label "Remove">
<!ENTITY languages.customize.deleteButton.accesskey "R">
<!ENTITY languages.customize.selectLanguage.label "Select a language to add…">
<!ENTITY languages.customize.addButton.label "Add">
<!ENTITY languages.customize.addButton.accesskey "A">
<!ENTITY languages.customize.spoofEnglish "Request English versions of web pages for enhanced privacy">

View File

@ -1 +0,0 @@
<!ENTITY disableExtension.label "Disable Extension">

View File

@ -1,29 +0,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/. -->
<!ENTITY window.title "Exceptions">
<!ENTITY window.width "45em">
<!ENTITY treehead.sitename2.label "Website">
<!ENTITY treehead.status.label "Status">
<!ENTITY removepermission2.label "Remove Website">
<!ENTITY removepermission2.accesskey "R">
<!ENTITY removeallpermissions2.label "Remove All Websites">
<!ENTITY removeallpermissions2.accesskey "e">
<!ENTITY address2.label "Address of website">
<!ENTITY address2.accesskey "d">
<!ENTITY block.label "Block">
<!ENTITY block.accesskey "B">
<!ENTITY session.label "Allow for Session">
<!ENTITY session.accesskey "S">
<!ENTITY allow.label "Allow">
<!ENTITY allow.accesskey "A">
<!ENTITY windowClose.key "w">
<!ENTITY button.cancel.label "Cancel">
<!ENTITY button.cancel.accesskey "C">
<!ENTITY button.ok.label "Save Changes">
<!ENTITY button.ok.accesskey "S">
<!ENTITY searchbox.placeholder "Search Website">

View File

@ -51,8 +51,6 @@ savedLoginsExceptions_desc3=Logins for the following websites will not be saved
#### Block List Manager
blockliststext=You can choose which list Firefox will use to block Web elements that may track your browsing activity.
blockliststitle=Block Lists
# LOCALIZATION NOTE (mozNameTemplate): This template constructs the name of the
# block list in the block lists dialog. It combines the list name and
# description.

View File

@ -1,9 +0,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/. -->
<!ENTITY selectBookmark.title
"Set Home Page">
<!ENTITY selectBookmark.label
"Choose a Bookmark to be your Home Page. If you choose a folder, the Bookmarks in that folder will be opened in Tabs.">

View File

@ -1,20 +0,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/. -->
<!ENTITY window2.title "Manage Cookies and Site Data">
<!ENTITY hostCol.label "Site">
<!ENTITY cookiesCol.label "Cookies">
<!ENTITY usageCol.label "Storage">
<!ENTITY lastAccessedCol.label "Last Used">
<!ENTITY searchTextboxPlaceHolder "Search websites">
<!ENTITY searchTextboxPlaceHolder.accesskey "S">
<!ENTITY removeSelected.label "Remove Selected">
<!ENTITY removeSelected.accesskey "r">
<!ENTITY save.label "Save Changes">
<!ENTITY save.accesskey "a">
<!ENTITY cancel.label "Cancel">
<!ENTITY cancel.accesskey "C">
<!ENTITY removingDialog1.title "Removing Cookies and Site Data">
<!ENTITY removingSelected1.description "Removing cookies and site data may log you out of websites. Are you sure you want to make the changes?">
<!ENTITY siteTree3.label "Cookies and site data for the following websites will be removed">

View File

@ -1,24 +0,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/. -->
<!ENTITY window.title "Exceptions - Translation">
<!ENTITY window.width "36em">
<!ENTITY windowClose.key "w">
<!ENTITY noTranslationForLanguages2.label "Translation will not be offered for the following languages">
<!ENTITY treehead.languageName.label "Languages">
<!ENTITY removeLanguage.label "Remove Language">
<!ENTITY removeLanguage.accesskey "R">
<!ENTITY removeAllLanguages.label "Remove All Languages">
<!ENTITY removeAllLanguages.accesskey "e">
<!ENTITY noTranslationForSites2.label "Translation will not be offered for the following sites">
<!ENTITY treehead.siteName2.label "Websites">
<!ENTITY removeSite.label "Remove Site">
<!ENTITY removeSite.accesskey "S">
<!ENTITY removeAllSites.label "Remove All Sites">
<!ENTITY removeAllSites.accesskey "i">
<!ENTITY button.close.label "Close">
<!ENTITY button.close.accesskey "C">

View File

@ -33,9 +33,8 @@ cmd_addFoundEngine=Add “%S”
# grouped in a submenu using cmd_addFoundEngineMenu as a label.
cmd_addFoundEngineMenu=Add search engine
searchAddFoundEngine=Add “%S” to One-Click Search
searchAddFoundEngineMenu=Add One-Click Search Engine
searchAddedFoundEngine=Added to Search Dropdown
searchAddFoundEngine2=Add Search Engine
searchAddedFoundEngine2=Added Search Engine
# LOCALIZATION NOTE (searchForSomethingWith2):
# This string is used to build the header above the list of one-click

View File

@ -55,25 +55,12 @@
locale/browser/feeds/subscribe.properties (%chrome/browser/feeds/subscribe.properties)
locale/browser/migration/migration.dtd (%chrome/browser/migration/migration.dtd)
locale/browser/migration/migration.properties (%chrome/browser/migration/migration.properties)
locale/browser/preferences/applicationManager.dtd (%chrome/browser/preferences/applicationManager.dtd)
locale/browser/preferences/applicationManager.properties (%chrome/browser/preferences/applicationManager.properties)
locale/browser/preferences/blocklists.dtd (%chrome/browser/preferences/blocklists.dtd)
locale/browser/preferences/clearSiteData.dtd (%chrome/browser/preferences/clearSiteData.dtd)
locale/browser/preferences/clearSiteData.properties (%chrome/browser/preferences/clearSiteData.properties)
locale/browser/preferences/colors.dtd (%chrome/browser/preferences/colors.dtd)
locale/browser/preferences/connection.dtd (%chrome/browser/preferences/connection.dtd)
locale/browser/preferences/content.dtd (%chrome/browser/preferences/content.dtd)
locale/browser/preferences/fonts.dtd (%chrome/browser/preferences/fonts.dtd)
locale/browser/preferences/languages.dtd (%chrome/browser/preferences/languages.dtd)
locale/browser/preferences/main.dtd (%chrome/browser/preferences/main.dtd)
locale/browser/preferences/permissions.dtd (%chrome/browser/preferences/permissions.dtd)
locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties)
locale/browser/preferences/privacy.dtd (%chrome/browser/preferences/privacy.dtd)
locale/browser/preferences/security.dtd (%chrome/browser/preferences/security.dtd)
locale/browser/preferences/selectBookmark.dtd (%chrome/browser/preferences/selectBookmark.dtd)
locale/browser/preferences/siteDataSettings.dtd (%chrome/browser/preferences/siteDataSettings.dtd)
locale/browser/preferences/sync.dtd (%chrome/browser/preferences/sync.dtd)
locale/browser/preferences/translation.dtd (%chrome/browser/preferences/translation.dtd)
locale/browser/syncBrand.dtd (%chrome/browser/syncBrand.dtd)
locale/browser/syncSetup.properties (%chrome/browser/syncSetup.properties)
#if BUILD_FASTER

View File

@ -59,11 +59,6 @@
}
/* Menu */
#placesMenu {
-moz-appearance: none;
border: none;
}
#placesMenu > menu {
padding-inline-start: 4px;
-moz-binding: url("chrome://browser/skin/places/organizer.xml#toolbarbutton-dropdown");

View File

@ -35,8 +35,6 @@
/* Menu */
#placesMenu {
margin-inline-start: 6px;
-moz-appearance: none;
border: none;
}
#placesMenu > menu {

View File

@ -464,6 +464,9 @@ BasePrincipal::CloneStrippingUserContextIdAndFirstPartyDomain()
bool
BasePrincipal::AddonAllowsLoad(nsIURI* aURI, bool aExplicit /* = false */)
{
if (Is<ExpandedPrincipal>()) {
return As<ExpandedPrincipal>()->AddonAllowsLoad(aURI, aExplicit);
}
if (auto policy = AddonPolicy()) {
return policy->CanAccessURI(aURI, aExplicit);
}

View File

@ -180,6 +180,17 @@ ExpandedPrincipal::AddonHasPermission(const nsAtom* aPerm)
return false;
}
bool
ExpandedPrincipal::AddonAllowsLoad(nsIURI* aURI, bool aExplicit /* = false */)
{
for (const auto& principal : mPrincipals) {
if (Cast(principal)->AddonAllowsLoad(aURI, aExplicit)) {
return true;
}
}
return false;
}
nsIPrincipal*
ExpandedPrincipal::PrincipalToInherit(nsIURI* aRequestedURI)
{

View File

@ -37,6 +37,8 @@ public:
virtual bool AddonHasPermission(const nsAtom* aPerm) override;
virtual nsresult GetScriptLocation(nsACString &aStr) override;
bool AddonAllowsLoad(nsIURI* aURI, bool aExplicit = false);
// Returns the principal to inherit when this principal requests the given
// URL. See BasePrincipal::PrincipalToInherit.
nsIPrincipal* PrincipalToInherit(nsIURI* aRequestedURI = nullptr);

View File

@ -141,6 +141,7 @@
</keyset>
<toolbar type="menubar">
<menubar id="sp-menubar">
<menu id="sp-file-menu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
<menupopup id="sp-menu-filepopup">
@ -330,6 +331,7 @@
</menupopup>
</menu>
</menubar>
</toolbar>
<toolbar id="sp-toolbar"
class="devtools-toolbar">

View File

@ -57,6 +57,7 @@
</commandset>
</commandset>
<toolbar type="menubar">
<menubar id="main-menubar">
<menu id="menu-project" label="&projectMenu_label;" accesskey="&projectMenu_accesskey;">
<menupopup id="menu-project-popup">
@ -97,6 +98,7 @@
</menu>
</menubar>
</toolbar>
<keyset id="mainKeyset">
<key key="&key_quit;" id="key_quit" command="cmd_quit" modifiers="accel"/>

View File

@ -1418,11 +1418,12 @@ Animation::UpdateEffect()
}
void
Animation::FlushStyle() const
Animation::FlushUnanimatedStyle() const
{
nsIDocument* doc = GetRenderedDocument();
if (doc) {
doc->FlushPendingNotifications(FlushType::Style);
doc->FlushPendingNotifications(
ChangesToFlush(FlushType::Style, false /* flush animations */));
}
}

View File

@ -432,7 +432,11 @@ protected:
void UpdateFinishedState(SeekFlag aSeekFlag,
SyncNotifyFlag aSyncNotifyFlag);
void UpdateEffect();
void FlushStyle() const;
/**
* Flush all pending styles other than throttled animation styles (e.g.
* animations running on the compositor).
*/
void FlushUnanimatedStyle() const;
void PostUpdate();
void ResetFinishedPromise();
void MaybeResolveFinishedPromise();

View File

@ -1807,6 +1807,107 @@ waitForAllPaints(() => {
await ensureElementRemoval(div);
});
add_task(
async function no_restyling_for_throttled_animation_on_querying_play_state() {
var div = addDiv(null, { style: 'animation: opacity 100s' });
var animation = div.getAnimations()[0];
var sibling = addDiv(null);
await animation.ready;
ok(SpecialPowers.wrap(animation).isRunningOnCompositor);
var markers = observeAnimSyncStyling(() => {
sibling.style.opacity = '0.5';
is(animation.playState, 'running',
'Animation.playState should be running');
});
is(markers.length, 0,
'Animation.playState should not flush throttled animation in the ' +
'case where there are only style changes that don\'t affect the ' +
'throttled animation');
await ensureElementRemoval(div);
await ensureElementRemoval(sibling);
}
);
add_task(
async function restyling_for_throttled_animation_on_querying_play_state() {
var div = addDiv(null, { style: 'animation: opacity 100s' });
var animation = div.getAnimations()[0];
await animation.ready;
ok(SpecialPowers.wrap(animation).isRunningOnCompositor);
var markers = observeAnimSyncStyling(() => {
div.style.animationPlayState = 'paused';
is(animation.playState, 'paused',
'Animation.playState should be reflected by pending style');
});
is(markers.length, 1,
'Animation.playState should flush throttled animation style that ' +
'affects the throttled animation');
await ensureElementRemoval(div);
}
);
add_task(
async function no_restyling_for_throttled_transition_on_querying_play_state() {
var div = addDiv(null, { style: 'transition: opacity 100s; opacity: 0' });
var sibling = addDiv(null);
getComputedStyle(div).opacity;
div.style.opacity = 1;
var transition = div.getAnimations()[0];
await transition.ready;
ok(SpecialPowers.wrap(transition).isRunningOnCompositor);
var markers = observeAnimSyncStyling(() => {
sibling.style.opacity = '0.5';
is(transition.playState, 'running',
'Animation.playState should be running');
});
is(markers.length, 0,
'Animation.playState should not flush throttled transition in the ' +
'case where there are only style changes that don\'t affect the ' +
'throttled animation');
await ensureElementRemoval(div);
await ensureElementRemoval(sibling);
}
);
add_task(
async function restyling_for_throttled_transition_on_querying_play_state() {
var div = addDiv(null, { style: 'transition: opacity 100s; opacity: 0' });
getComputedStyle(div).opacity;
div.style.opacity = '1';
var transition = div.getAnimations()[0];
await transition.ready;
ok(SpecialPowers.wrap(transition).isRunningOnCompositor);
var markers = observeAnimSyncStyling(() => {
div.style.transitionProperty = 'none';
is(transition.playState, 'idle',
'Animation.playState should be reflected by pending style change ' +
'which cancel the transition');
});
is(markers.length, 1,
'Animation.playState should flush throttled transition style that ' +
'affects the throttled animation');
await ensureElementRemoval(div);
}
);
});
</script>

View File

@ -696,8 +696,10 @@ CustomElementRegistry::Define(const nsAString& aName,
* 2. If name is not a valid custom element name, then throw a "SyntaxError"
* DOMException and abort these steps.
*/
nsIDocument* doc = mWindow->GetExtantDoc();
uint32_t nameSpaceID = doc ? doc->GetDefaultNamespaceID() : kNameSpaceID_XHTML;
RefPtr<nsAtom> nameAtom(NS_Atomize(aName));
if (!nsContentUtils::IsCustomElementName(nameAtom)) {
if (!nsContentUtils::IsCustomElementName(nameAtom, nameSpaceID)) {
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
return;
}
@ -739,7 +741,7 @@ CustomElementRegistry::Define(const nsAString& aName,
nsAutoString localName(aName);
if (aOptions.mExtends.WasPassed()) {
RefPtr<nsAtom> extendsAtom(NS_Atomize(aOptions.mExtends.Value()));
if (nsContentUtils::IsCustomElementName(extendsAtom)) {
if (nsContentUtils::IsCustomElementName(extendsAtom, nameSpaceID)) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return;
}
@ -979,7 +981,9 @@ CustomElementRegistry::WhenDefined(const nsAString& aName, ErrorResult& aRv)
}
RefPtr<nsAtom> nameAtom(NS_Atomize(aName));
if (!nsContentUtils::IsCustomElementName(nameAtom)) {
nsIDocument* doc = mWindow->GetExtantDoc();
uint32_t nameSpaceID = doc ? doc->GetDefaultNamespaceID() : kNameSpaceID_XHTML;
if (!nsContentUtils::IsCustomElementName(nameAtom, nameSpaceID)) {
promise->MaybeReject(NS_ERROR_DOM_SYNTAX_ERR);
return promise.forget();
}

View File

@ -415,27 +415,25 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
double intersectionRatio;
if (targetArea > 0.0) {
intersectionRatio = (double) intersectionArea / (double) targetArea;
intersectionRatio =
std::min((double) intersectionArea / (double) targetArea, 1.0);
} else {
intersectionRatio = intersectionRect.isSome() ? 1.0 : 0.0;
}
int32_t threshold = -1;
if (intersectionRatio > 0.0) {
if (intersectionRatio >= 1.0) {
intersectionRatio = 1.0;
threshold = (int32_t)mThresholds.Length();
} else {
for (size_t k = 0; k < mThresholds.Length(); ++k) {
if (mThresholds[k] <= intersectionRatio) {
threshold = (int32_t)k + 1;
} else {
break;
}
}
if (intersectionRect.isSome()) {
// Spec: "Let thresholdIndex be the index of the first entry in
// observer.thresholds whose value is greater than intersectionRatio."
threshold = mThresholds.IndexOfFirstElementGt(intersectionRatio);
if (threshold == 0) {
// Per the spec, we should leave threshold at 0 and distinguish between
// "less than all thresholds and intersecting" and "not intersecting"
// (queuing observer entries as both cases come to pass). However,
// neither Chrome nor the WPT tests expect this behavior, so treat these
// two cases as one.
threshold = -1;
}
} else if (intersectionRect.isSome()) {
threshold = 0;
}
if (target->UpdateIntersectionObservation(this, threshold)) {

View File

@ -1196,7 +1196,7 @@ Element::AttachShadow(const ShadowRootInit& aInit, ErrorResult& aError)
* then throw a "NotSupportedError" DOMException.
*/
nsAtom* nameAtom = NodeInfo()->NameAtom();
if (!(nsContentUtils::IsCustomElementName(nameAtom) ||
if (!(nsContentUtils::IsCustomElementName(nameAtom, NodeInfo()->NamespaceID()) ||
nameAtom == nsGkAtoms::article ||
nameAtom == nsGkAtoms::aside ||
nameAtom == nsGkAtoms::blockquote ||
@ -4299,7 +4299,7 @@ Element::SetCustomElementData(CustomElementData* aData)
#if DEBUG
nsAtom* name = NodeInfo()->NameAtom();
nsAtom* type = aData->GetCustomElementType();
if (nsContentUtils::IsCustomElementName(name)) {
if (nsContentUtils::IsCustomElementName(name, NodeInfo()->NamespaceID())) {
MOZ_ASSERT(type == name);
} else {
MOZ_ASSERT(type != name);

View File

@ -3194,8 +3194,13 @@ nsContentUtils::NewURIWithDocumentCharset(nsIURI** aResult,
// static
bool
nsContentUtils::IsCustomElementName(nsAtom* aName)
nsContentUtils::IsCustomElementName(nsAtom* aName, uint32_t aNameSpaceID)
{
// Allow non-dashed names in XUL for XBL to Custom Element migrations.
if (aNameSpaceID == kNameSpaceID_XUL) {
return true;
}
// A valid custom element name is a sequence of characters name which
// must match the PotentialCustomElementName production:
// PotentialCustomElementName ::= [a-z] (PCENChar)* '-' (PCENChar)*
@ -9954,9 +9959,9 @@ nsContentUtils::NewXULOrHTMLElement(Element** aResult, mozilla::dom::NodeInfo* a
if (nodeInfo->NamespaceEquals(kNameSpaceID_XHTML)) {
tag = nsHTMLTags::CaseSensitiveAtomTagToId(name);
isCustomElementName = (tag == eHTMLTag_userdefined &&
nsContentUtils::IsCustomElementName(name));
nsContentUtils::IsCustomElementName(name, kNameSpaceID_XHTML));
} else {
isCustomElementName = nsContentUtils::IsCustomElementName(name);
isCustomElementName = nsContentUtils::IsCustomElementName(name, kNameSpaceID_XUL);
}
RefPtr<nsAtom> tagAtom = nodeInfo->NameAtom();

View File

@ -710,7 +710,7 @@ public:
* Returns true if |aName| is a valid name to be registered via
* customElements.define.
*/
static bool IsCustomElementName(nsAtom* aName);
static bool IsCustomElementName(nsAtom* aName, uint32_t aNameSpaceID);
static nsresult CheckQName(const nsAString& aQualifiedName,
bool aNamespaceAware = true,

View File

@ -491,10 +491,8 @@ CollectWindowReports(nsGlobalWindowInner *aWindow,
} \
aWindowTotalSizes->mStyleSizes.NS_STYLE_SIZES_FIELD(name_) += size; \
}
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
if (styleSundriesSize > 0) {
REPORT_SUM_SIZE(
@ -690,10 +688,8 @@ nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
#define STYLE_STRUCT(name_) \
styleTotal += \
windowTotalSizes.mStyleSizes.NS_STYLE_SIZES_FIELD(name_);
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
REPORT("window-objects/layout/style-structs", styleTotal,
"Memory used for style structs within windows. This is the sum of "

View File

@ -54,10 +54,8 @@ struct nsStyleSizes
:
#define STYLE_STRUCT(name_) \
NS_STYLE_SIZES_FIELD(name_)(0),
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
dummy()
{}
@ -66,10 +64,8 @@ struct nsStyleSizes
{
#define STYLE_STRUCT(name_) \
aSizes->add(nsTabSizes::Style, NS_STYLE_SIZES_FIELD(name_));
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
}
size_t getTotalSize() const
@ -78,20 +74,16 @@ struct nsStyleSizes
#define STYLE_STRUCT(name_) \
total += NS_STYLE_SIZES_FIELD(name_);
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
return total;
}
#define STYLE_STRUCT(name_) \
size_t NS_STYLE_SIZES_FIELD(name_);
#define STYLE_STRUCT_LIST_IGNORE_VARIABLES
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
#undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
// Present just to absorb the trailing comma in the constructor.
int dummy;

View File

@ -1915,9 +1915,11 @@ setupPrototype(RTCDTMFSender, {
});
class RTCRtpSender {
constructor(pc, transceiverImpl, transceiver, track, streams) {
let dtmf = pc._win.RTCDTMFSender._create(
pc._win, new RTCDTMFSender(this));
constructor(pc, transceiverImpl, transceiver, track, kind, streams) {
let dtmf = null;
if (kind == "audio") {
dtmf = pc._win.RTCDTMFSender._create(pc._win, new RTCDTMFSender(this));
}
Object.assign(this, {
_pc: pc,
@ -2225,7 +2227,7 @@ class RTCRtpTransceiver {
pc._win, new RTCRtpReceiver(pc, transceiverImpl, kind));
let streams = (init && init.streams) || [];
let sender = pc._win.RTCRtpSender._create(
pc._win, new RTCRtpSender(pc, transceiverImpl, this, sendTrack, streams));
pc._win, new RTCRtpSender(pc, transceiverImpl, this, sendTrack, kind, streams));
let direction = (init && init.direction) || "sendrecv";
Object.assign(this,

View File

@ -0,0 +1,19 @@
<html class="reftest-wait">
<head>
<script>
function getDTMF () {
try { o4 = o2.dtmf } catch(e) { }
try { o4.insertDTMF("1BC1D55", new Uint32Array([3538134876])[0], new Uint32Array([666182017])[0]) } catch (e) { }
document.documentElement.removeAttribute("class");
}
o1 = new RTCPeerConnection({ }, null)
window.navigator.mediaDevices.getUserMedia({video: true, fake: true}).then((stream) => {
o2 = o1.addTrack(stream.getVideoTracks()[0], stream)
}).catch((error) => {})
o3 = window.open("datr=0")
setTimeout(getDTMF, 400)
setTimeout(window.location.reload.bind(window.location), 500);
</script>
</head>
</html>

View File

@ -20,3 +20,4 @@ load 1306476.html
load 1348381.html
load 1367930_1.html
load 1367930_2.html
load 1453030.html

View File

@ -6,6 +6,7 @@
#include "PerformanceResourceTiming.h"
#include "mozilla/dom/PerformanceResourceTimingBinding.h"
#include "nsNetUtil.h"
using namespace mozilla::dom;
@ -31,6 +32,11 @@ PerformanceResourceTiming::PerformanceResourceTiming(UniquePtr<PerformanceTiming
, mPerformance(aPerformance)
{
MOZ_ASSERT(aPerformance, "Parent performance object should be provided");
if (NS_IsMainThread()) {
// Used to check if an addon content script has access to this timing.
// We don't need it in workers, and ignore mOriginalURI if null.
NS_NewURI(getter_AddRefs(mOriginalURI), aName);
}
}
PerformanceResourceTiming::~PerformanceResourceTiming()
@ -80,3 +86,35 @@ PerformanceResourceTiming::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSize
? mTimingData->NextHopProtocol().SizeOfExcludingThisIfUnshared(aMallocSizeOf)
: 0);
}
bool
PerformanceResourceTiming::TimingAllowedForCaller(Maybe<nsIPrincipal*>& aCaller) const
{
if (!mTimingData) {
return false;
}
if (mTimingData->TimingAllowed()) {
return true;
}
// Check if the addon has permission to access the cross-origin resource.
return mOriginalURI && aCaller.isSome() &&
BasePrincipal::Cast(aCaller.value())->AddonAllowsLoad(mOriginalURI);
}
bool
PerformanceResourceTiming::ReportRedirectForCaller(Maybe<nsIPrincipal*>& aCaller) const
{
if (!mTimingData) {
return false;
}
if (mTimingData->ShouldReportCrossOriginRedirect()) {
return true;
}
// Only report cross-origin redirect if the addon has <all_urls> permission.
return aCaller.isSome() &&
BasePrincipal::Cast(aCaller.value())->AddonHasPermission(nsGkAtoms::all_urlsPermission);
}

View File

@ -70,54 +70,54 @@ public:
: 0;
}
DOMHighResTimeStamp RedirectStart() const {
DOMHighResTimeStamp RedirectStart(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
// We have to check if all the redirect URIs had the same origin (since
// there is no check in RedirectEndHighRes())
return mTimingData && mTimingData->ShouldReportCrossOriginRedirect()
// there is no check in RedirectStartHighRes())
return ReportRedirectForCaller(aSubjectPrincipal)
? mTimingData->RedirectStartHighRes(mPerformance)
: 0;
}
DOMHighResTimeStamp RedirectEnd() const {
DOMHighResTimeStamp RedirectEnd(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
// We have to check if all the redirect URIs had the same origin (since
// there is no check in RedirectEndHighRes())
return mTimingData && mTimingData->ShouldReportCrossOriginRedirect()
return ReportRedirectForCaller(aSubjectPrincipal)
? mTimingData->RedirectEndHighRes(mPerformance)
: 0;
}
DOMHighResTimeStamp DomainLookupStart() const {
return mTimingData && mTimingData->TimingAllowed()
DOMHighResTimeStamp DomainLookupStart(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->DomainLookupStartHighRes(mPerformance)
: 0;
}
DOMHighResTimeStamp DomainLookupEnd() const {
return mTimingData && mTimingData->TimingAllowed()
DOMHighResTimeStamp DomainLookupEnd(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->DomainLookupEndHighRes(mPerformance)
: 0;
}
DOMHighResTimeStamp ConnectStart() const {
return mTimingData && mTimingData->TimingAllowed()
DOMHighResTimeStamp ConnectStart(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->ConnectStartHighRes(mPerformance)
: 0;
}
DOMHighResTimeStamp ConnectEnd() const {
return mTimingData && mTimingData->TimingAllowed()
DOMHighResTimeStamp ConnectEnd(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->ConnectEndHighRes(mPerformance)
: 0;
}
DOMHighResTimeStamp RequestStart() const {
return mTimingData && mTimingData->TimingAllowed()
DOMHighResTimeStamp RequestStart(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->RequestStartHighRes(mPerformance)
: 0;
}
DOMHighResTimeStamp ResponseStart() const {
return mTimingData && mTimingData->TimingAllowed()
DOMHighResTimeStamp ResponseStart(Maybe<nsIPrincipal*>& aSubjectPrincipal) const {
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->ResponseStartHighRes(mPerformance)
: 0;
}
@ -128,10 +128,10 @@ public:
: 0;
}
DOMHighResTimeStamp SecureConnectionStart() const
DOMHighResTimeStamp SecureConnectionStart(Maybe<nsIPrincipal*>& aSubjectPrincipal) const
{
return mTimingData && mTimingData->TimingAllowed()
? mTimingData->SecureConnectionStartHighRes(mPerformance)
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->SecureConnectionStartHighRes(mPerformance)
: 0;
}
@ -140,19 +140,25 @@ public:
return this;
}
uint64_t TransferSize() const
uint64_t TransferSize(Maybe<nsIPrincipal*>& aSubjectPrincipal) const
{
return mTimingData ? mTimingData->TransferSize() : 0;
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->TransferSize()
: 0;
}
uint64_t EncodedBodySize() const
uint64_t EncodedBodySize(Maybe<nsIPrincipal*>& aSubjectPrincipal) const
{
return mTimingData ? mTimingData->EncodedBodySize() : 0;
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->EncodedBodySize()
: 0;
}
uint64_t DecodedBodySize() const
uint64_t DecodedBodySize(Maybe<nsIPrincipal*>& aSubjectPrincipal) const
{
return mTimingData ? mTimingData->DecodedBodySize() : 0;
return TimingAllowedForCaller(aSubjectPrincipal)
? mTimingData->DecodedBodySize()
: 0;
}
size_t
@ -164,9 +170,21 @@ protected:
size_t
SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
// Check if caller has access to cross-origin timings, either by the rules
// from the spec, or based on addon permissions.
bool
TimingAllowedForCaller(Maybe<nsIPrincipal*>& aCaller) const;
// Check if cross-origin redirects should be reported to the caller.
bool
ReportRedirectForCaller(Maybe<nsIPrincipal*>& aCaller) const;
nsString mInitiatorType;
UniquePtr<PerformanceTimingData> mTimingData;
RefPtr<Performance> mPerformance;
// The same initial requested URI as the `name` attribute.
nsCOMPtr<nsIURI> mOriginalURI;
};
} // namespace dom

View File

@ -54,17 +54,17 @@ public:
uint64_t TransferSize() const
{
return mTimingAllowed ? mTransferSize : 0;
return mTransferSize;
}
uint64_t EncodedBodySize() const
{
return mTimingAllowed ? mEncodedBodySize : 0;
return mEncodedBodySize;
}
uint64_t DecodedBodySize() const
{
return mTimingAllowed ? mDecodedBodySize : 0;
return mDecodedBodySize;
}
/**

View File

@ -26,6 +26,9 @@
customElements.define("test-custom-element", TestCustomElement);
class TestWithoutDash extends XULElement { }
customElements.define("testwithoutdash", TestWithoutDash);
function runTest() {
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@ -53,6 +56,9 @@
"Parser should have instantiated the custom element.");
ok(element4 instanceof TestCustomElement, "Should be an instance of TestCustomElement");
let element5 = document.getElementById("element5");
ok(element5 instanceof TestWithoutDash, "Should be an instance of TestWithoutDash");
SimpleTest.finish();
}
]]>
@ -62,6 +68,7 @@
<p id="display"></p>
<div id="content" style="display: none">
<test-custom-element id="element4" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>
<testwithoutdash id="element5" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>
</div>
<pre id="test"></pre>
</body>

View File

@ -17,20 +17,36 @@ interface PerformanceResourceTiming : PerformanceEntry
readonly attribute DOMString nextHopProtocol;
readonly attribute DOMHighResTimeStamp workerStart;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp redirectStart;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp redirectEnd;
readonly attribute DOMHighResTimeStamp fetchStart;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp domainLookupStart;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp domainLookupEnd;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp connectStart;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp connectEnd;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp secureConnectionStart;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp requestStart;
[NeedsSubjectPrincipal]
readonly attribute DOMHighResTimeStamp responseStart;
readonly attribute DOMHighResTimeStamp responseEnd;
[NeedsSubjectPrincipal]
readonly attribute unsigned long long transferSize;
[NeedsSubjectPrincipal]
readonly attribute unsigned long long encodedBodySize;
[NeedsSubjectPrincipal]
readonly attribute unsigned long long decodedBodySize;
jsonifier;

View File

@ -57,7 +57,7 @@ public:
static void SetUpdaterThread(const wr::WrWindowId& aWindowId);
static void PrepareForSceneSwap(const wr::WrWindowId& aWindowId);
static void CompleteSceneSwap(const wr::WrWindowId& aWindowId,
wr::WrPipelineInfo* aInfo);
const wr::WrPipelineInfo& aInfo);
static void ProcessPendingTasks(const wr::WrWindowId& aWindowId);
void ClearTree(LayersId aRootLayersId);

View File

@ -79,7 +79,7 @@ APZUpdater::PrepareForSceneSwap(const wr::WrWindowId& aWindowId)
/*static*/ void
APZUpdater::CompleteSceneSwap(const wr::WrWindowId& aWindowId,
wr::WrPipelineInfo* aInfo)
const wr::WrPipelineInfo& aInfo)
{
RefPtr<APZUpdater> updater = GetUpdater(aWindowId);
if (!updater) {
@ -90,10 +90,8 @@ APZUpdater::CompleteSceneSwap(const wr::WrWindowId& aWindowId,
return;
}
wr::WrPipelineId pipeline;
wr::WrEpoch epoch;
while (wr_pipeline_info_next_removed_pipeline(aInfo, &pipeline)) {
LayersId layersId = wr::AsLayersId(pipeline);
for (uintptr_t i = 0; i < aInfo.removed_pipelines.length; i++) {
LayersId layersId = wr::AsLayersId(aInfo.removed_pipelines.data[i]);
updater->mEpochData.erase(layersId);
}
// Reset the built info for all pipelines, then put it back for the ones
@ -101,11 +99,10 @@ APZUpdater::CompleteSceneSwap(const wr::WrWindowId& aWindowId,
for (auto& i : updater->mEpochData) {
i.second.mBuilt = Nothing();
}
while (wr_pipeline_info_next_epoch(aInfo, &pipeline, &epoch)) {
LayersId layersId = wr::AsLayersId(pipeline);
updater->mEpochData[layersId].mBuilt = Some(epoch);
for (uintptr_t i = 0; i < aInfo.epochs.length; i++) {
LayersId layersId = wr::AsLayersId(aInfo.epochs.data[i].pipeline_id);
updater->mEpochData[layersId].mBuilt = Some(aInfo.epochs.data[i].epoch);
}
wr_pipeline_info_delete(aInfo);
// Run any tasks that got unblocked, then unlock the tree. The order is
// important because we want to run all the tasks up to and including the
@ -525,11 +522,12 @@ apz_pre_scene_swap(mozilla::wr::WrWindowId aWindowId)
void
apz_post_scene_swap(mozilla::wr::WrWindowId aWindowId,
mozilla::wr::WrPipelineInfo* aInfo)
mozilla::wr::WrPipelineInfo aInfo)
{
// This should never get called unless async scene building is enabled.
MOZ_ASSERT(gfxPrefs::WebRenderAsyncSceneBuild());
mozilla::layers::APZUpdater::CompleteSceneSwap(aWindowId, aInfo);
wr_pipeline_info_delete(aInfo);
}
void

View File

@ -232,17 +232,19 @@ RenderThread::RunEvent(wr::WindowId aWindowId, UniquePtr<RendererEvent> aEvent)
static void
NotifyDidRender(layers::CompositorBridgeParentBase* aBridge,
wr::WrPipelineInfo* aInfo,
wr::WrPipelineInfo aInfo,
TimeStamp aStart,
TimeStamp aEnd)
{
wr::WrPipelineId pipeline;
wr::WrEpoch epoch;
while (wr_pipeline_info_next_epoch(aInfo, &pipeline, &epoch)) {
aBridge->NotifyDidCompositeToPipeline(pipeline, epoch, aStart, aEnd);
for (uintptr_t i = 0; i < aInfo.epochs.length; i++) {
aBridge->NotifyDidCompositeToPipeline(
aInfo.epochs.data[i].pipeline_id,
aInfo.epochs.data[i].epoch,
aStart,
aEnd);
}
while (wr_pipeline_info_next_removed_pipeline(aInfo, &pipeline)) {
aBridge->NotifyPipelineRemoved(pipeline);
for (uintptr_t i = 0; i < aInfo.removed_pipelines.length; i++) {
aBridge->NotifyPipelineRemoved(aInfo.removed_pipelines.data[i]);
}
wr_pipeline_info_delete(aInfo);

View File

@ -191,7 +191,7 @@ RendererOGL::SetFrameStartTime(const TimeStamp& aTime)
mFrameStartTime = aTime;
}
wr::WrPipelineInfo*
wr::WrPipelineInfo
RendererOGL::FlushPipelineInfo()
{
return wr_renderer_flush_pipeline_info(mRenderer);

View File

@ -84,7 +84,7 @@ public:
layers::CompositorBridgeParentBase* GetCompositorBridge() { return mBridge; }
wr::WrPipelineInfo* FlushPipelineInfo();
wr::WrPipelineInfo FlushPipelineInfo();
RenderTextureHost* GetRenderTexture(wr::WrExternalImageId aExternalImageId);

View File

@ -159,6 +159,39 @@ impl WrVecU8 {
}
}
#[repr(C)]
pub struct FfiVec<T> {
// We use a *const instead of a *mut because we don't want the C++ side
// to be mutating this. It is strictly read-only from C++
data: *const T,
length: usize,
capacity: usize,
}
impl<T> FfiVec<T> {
fn from_vec(v: Vec<T>) -> FfiVec<T> {
let ret = FfiVec {
data: v.as_ptr(),
length: v.len(),
capacity: v.capacity(),
};
mem::forget(v);
ret
}
}
impl<T> Drop for FfiVec<T> {
fn drop(&mut self) {
// turn the stuff back into a Vec and let it be freed normally
let _ = unsafe {
Vec::from_raw_parts(
self.data as *mut T,
self.length,
self.capacity
)
};
}
}
#[no_mangle]
pub extern "C" fn wr_vec_u8_push_bytes(v: &mut WrVecU8, bytes: ByteSlice) {
@ -597,65 +630,67 @@ pub unsafe extern "C" fn wr_renderer_delete(renderer: *mut Renderer) {
// let renderer go out of scope and get dropped
}
// cbindgen doesn't support tuples, so we have a little struct instead, with
// an Into implementation to convert from the tuple to the struct.
#[repr(C)]
pub struct WrPipelineEpoch {
pipeline_id: WrPipelineId,
epoch: WrEpoch,
}
impl From<(WrPipelineId, WrEpoch)> for WrPipelineEpoch {
fn from(tuple: (WrPipelineId, WrEpoch)) -> WrPipelineEpoch {
WrPipelineEpoch {
pipeline_id: tuple.0,
epoch: tuple.1
}
}
}
#[repr(C)]
pub struct WrPipelineInfo {
epochs: Vec<(WrPipelineId, WrEpoch)>,
removed_pipelines: Vec<PipelineId>,
// This contains an entry for each pipeline that was rendered, along with
// the epoch at which it was rendered. Rendered pipelines include the root
// pipeline and any other pipelines that were reachable via IFrame display
// items from the root pipeline.
epochs: FfiVec<WrPipelineEpoch>,
// This contains an entry for each pipeline that was removed during the
// last transaction. These pipelines would have been explicitly removed by
// calling remove_pipeline on the transaction object; the pipeline showing
// up in this array means that the data structures have been torn down on
// the webrender side, and so any remaining data structures on the caller
// side can now be torn down also.
removed_pipelines: FfiVec<PipelineId>,
}
impl WrPipelineInfo {
fn new(info: PipelineInfo) -> Self {
WrPipelineInfo {
epochs: info.epochs.into_iter().collect(),
removed_pipelines: info.removed_pipelines,
epochs: FfiVec::from_vec(info.epochs.into_iter().map(WrPipelineEpoch::from).collect()),
removed_pipelines: FfiVec::from_vec(info.removed_pipelines),
}
}
}
#[no_mangle]
pub unsafe extern "C" fn wr_renderer_flush_pipeline_info(renderer: &mut Renderer) -> *mut WrPipelineInfo {
pub unsafe extern "C" fn wr_renderer_flush_pipeline_info(renderer: &mut Renderer) -> WrPipelineInfo {
let info = renderer.flush_pipeline_info();
Box::into_raw(Box::new(WrPipelineInfo::new(info)))
}
#[no_mangle]
pub unsafe extern "C" fn wr_pipeline_info_next_epoch(
info: &mut WrPipelineInfo,
out_pipeline: &mut WrPipelineId,
out_epoch: &mut WrEpoch
) -> bool {
if let Some((pipeline, epoch)) = info.epochs.pop() {
*out_pipeline = pipeline;
*out_epoch = epoch;
return true;
}
return false;
}
#[no_mangle]
pub unsafe extern "C" fn wr_pipeline_info_next_removed_pipeline(
info: &mut WrPipelineInfo,
out_pipeline: &mut WrPipelineId,
) -> bool {
if let Some(pipeline) = info.removed_pipelines.pop() {
*out_pipeline = pipeline;
return true;
}
return false;
WrPipelineInfo::new(info)
}
/// cbindgen:postfix=WR_DESTRUCTOR_SAFE_FUNC
#[no_mangle]
pub unsafe extern "C" fn wr_pipeline_info_delete(info: *mut WrPipelineInfo) {
Box::from_raw(info);
pub unsafe extern "C" fn wr_pipeline_info_delete(_info: WrPipelineInfo) {
// _info will be dropped here, and the drop impl on FfiVec will free
// the underlying vec memory
}
#[allow(improper_ctypes)] // this is needed so that rustc doesn't complain about passing the *mut WrPipelineInfo to an extern function
extern "C" {
fn apz_register_updater(window_id: WrWindowId);
fn apz_pre_scene_swap(window_id: WrWindowId);
// This function takes ownership of the pipeline_info and is responsible for
// freeing it via wr_pipeline_info_delete.
fn apz_post_scene_swap(window_id: WrWindowId, pipeline_info: *mut WrPipelineInfo);
fn apz_post_scene_swap(window_id: WrWindowId, pipeline_info: WrPipelineInfo);
fn apz_run_updater(window_id: WrWindowId);
fn apz_deregister_updater(window_id: WrWindowId);
}
@ -682,7 +717,7 @@ impl SceneBuilderHooks for APZCallbacks {
}
fn post_scene_swap(&self, info: PipelineInfo) {
let info = Box::into_raw(Box::new(WrPipelineInfo::new(info)));
let info = WrPipelineInfo::new(info);
unsafe { apz_post_scene_swap(self.window_id, info) }
}

View File

@ -93,7 +93,7 @@ struct WrPipelineInfo;
void apz_register_updater(mozilla::wr::WrWindowId aWindowId);
void apz_pre_scene_swap(mozilla::wr::WrWindowId aWindowId);
void apz_post_scene_swap(mozilla::wr::WrWindowId aWindowId, mozilla::wr::WrPipelineInfo* aInfo);
void apz_post_scene_swap(mozilla::wr::WrWindowId aWindowId, mozilla::wr::WrPipelineInfo aInfo);
void apz_run_updater(mozilla::wr::WrWindowId aWindowId);
void apz_deregister_updater(mozilla::wr::WrWindowId aWindowId);

Some files were not shown because too many files have changed in this diff Show More