merge fx-team to mozilla-central a=merge

This commit is contained in:
Carsten "Tomcat" Book 2015-11-02 11:51:09 +01:00
commit 60c18dcb28
7 changed files with 18 additions and 11 deletions

View File

@ -6,10 +6,11 @@ function promiseAlertWindow() {
alertWindow.addEventListener("load", function onLoad() {
alertWindow.removeEventListener("load", onLoad);
let windowType = alertWindow.document.documentElement.getAttribute("windowtype");
if (windowType == "alert:alert") {
Services.wm.removeListener(listener);
resolve(alertWindow);
if (windowType != "alert:alert") {
return;
}
Services.wm.removeListener(listener);
resolve(alertWindow);
});
},
};
@ -17,8 +18,10 @@ function promiseAlertWindow() {
});
}
// `promiseWindowClosed` is similar to `BrowserTestUtils.closeWindow`, but
// doesn't call `window.close()`.
/**
* Similar to `BrowserTestUtils.closeWindow`, but
* doesn't call `window.close()`.
*/
function promiseWindowClosed(window) {
return new Promise(function(resolve) {
Services.ww.registerNotification(function observer(subject, topic, data) {

View File

@ -127,7 +127,7 @@ var gContentPane = {
let bundlePreferences = document.getElementById("bundlePreferences");
let params = { permissionType: "desktop-notification" };
params.windowTitle = bundlePreferences.getString("notificationspermissionstitle");
params.introText = bundlePreferences.getString("notificationspermissionstext3");
params.introText = bundlePreferences.getString("notificationspermissionstext4");
gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
"resizable=yes", params);

View File

@ -70,7 +70,7 @@
<rows>
<row id="notificationsPolicyRow" align="center">
<hbox align="start">
<label id="notificationsPolicy">&notificationsPolicyDesc2.label;</label>
<label id="notificationsPolicy">&notificationsPolicyDesc3.label;</label>
<label id="notificationsPolicyLearnMore"
class="text-link"
value="&notificationsPolicyLearnMore.label;"/>

View File

@ -382,7 +382,9 @@ webNotifications.alwaysReceive.accesskey=A
webNotifications.neverShow=Always Block Notifications
webNotifications.neverShow.accesskey=N
webNotifications.receiveFromSite=Would you like to receive notifications from this site?
# LOCALIZATION NOTE (webNotifications.upgradeTitle): When using native notifications on OS X, the title may be truncated around 32 characters.
webNotifications.upgradeTitle=Upgraded notifications
# LOCALIZATION NOTE (webNotifications.upgradeInfo): When using native notifications on OS X, the body may be truncated around 100 characters in some views.
webNotifications.upgradeInfo=You will receive notifications from sites, even those not open in a tab. Click to learn more.
# Pointer lock UI

View File

@ -9,7 +9,7 @@
<!ENTITY notificationsPolicy.label "Notifications">
<!ENTITY notificationsPolicyLearnMore.label "Learn more">
<!ENTITY notificationsPolicyDesc2.label "Choose which sites are allowed to receive notifications">
<!ENTITY notificationsPolicyDesc3.label "Choose which sites are allowed to send you notifications">
<!ENTITY notificationsPolicyButton.accesskey "h">
<!ENTITY notificationsPolicyButton.label "Choose…">
<!ENTITY notificationsDoNotDisturb.label "Do not disturb me">

View File

@ -25,7 +25,7 @@ addonspermissionstext=You can specify which websites are allowed to install add-
addons_permissions_title=Allowed Sites - Add-ons Installation
popuppermissionstext=You can specify which websites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
popuppermissionstitle=Allowed Sites - Pop-ups
notificationspermissionstext3=Control which websites are always or never allowed to receive notifications. If you remove a site, it will need to request permission again.
notificationspermissionstext4=Control which websites are always or never allowed to send you notifications. If you remove a site, it will need to request permission again.
notificationspermissionstitle=Notification Permissions
invalidURI=Please enter a valid hostname
invalidURITitle=Invalid Hostname Entered

View File

@ -259,8 +259,10 @@ PROT_ListManager.prototype.kickoffUpdate_ = function (onDiskTableData)
PROT_ListManager.prototype.stopUpdateCheckers = function() {
log("Stopping updates");
for (var updateUrl in this.updateCheckers_) {
this.updateCheckers_[updateUrl].cancel();
this.updateCheckers_[updateUrl] = null;
if (this.updateCheckers_[updateUrl]) {
this.updateCheckers_[updateUrl].cancel();
this.updateCheckers_[updateUrl] = null;
}
}
}