Merge fx-team to central, a=merge

MozReview-Commit-ID: FKKE7Ry6SbZ
This commit is contained in:
Wes Kocher 2016-04-20 14:17:46 -07:00
Родитель e5a7b1fed7 9979406b4a
Коммит 2afb08eb87
28 изменённых файлов: 511 добавлений и 469 удалений

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

@ -346,48 +346,10 @@ pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240"
pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240"
#ifdef MOZ_SAFE_BROWSING
pref("browser.safebrowsing.enabled", true);
// Prevent loading of pages identified as malware
pref("browser.safebrowsing.malware.enabled", true);
pref("browser.safebrowsing.downloads.enabled", true);
pref("browser.safebrowsing.downloads.remote.enabled", true);
pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000);
pref("browser.safebrowsing.downloads.remote.url", "https://sb-ssl.google.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.downloads.remote.block_dangerous", true);
pref("browser.safebrowsing.downloads.remote.block_dangerous_host", true);
pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
pref("browser.safebrowsing.downloads.remote.block_uncommon", false);
pref("browser.safebrowsing.debug", false);
pref("browser.safebrowsing.provider.google.lists", "goog-badbinurl-shavar,goog-downloadwhite-digest256,goog-phish-shavar,goog-malware-shavar,goog-unwanted-shavar");
pref("browser.safebrowsing.provider.google.updateURL", "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2&key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.provider.google.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2");
pref("browser.safebrowsing.provider.google.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
pref("browser.safebrowsing.reportPhishMistakeURL", "https://%LOCALE%.phish-error.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportPhishURL", "https://%LOCALE%.phish-report.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportMalwareMistakeURL", "https://%LOCALE%.malware-error.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.id", "Firefox");
// Tables for application reputation.
pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar");
// The number of random entries to send with a gethash request.
pref("urlclassifier.gethashnoise", 4);
// Gethash timeout for Safebrowsing.
pref("urlclassifier.gethash.timeout_ms", 5000);
// If an urlclassifier table has not been updated in this number of seconds,
// a gethash request will be forced to check that the result is still in
// the database.
pref("urlclassifier.max-complete-age", 2700);
// Tracking protection
pref("privacy.trackingprotection.enabled", false);
pref("privacy.trackingprotection.pbmode.enabled", true);
#endif
// True if this is the first time we are showing about:firstrun

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

@ -780,26 +780,8 @@ pref("gecko.handlerService.schemes.ircs.3.uriTemplate", "chrome://browser-region
pref("gecko.handlerService.allowRegisterFromDifferentHost", false);
#ifdef MOZ_SAFE_BROWSING
pref("browser.safebrowsing.enabled", true);
pref("browser.safebrowsing.malware.enabled", true);
pref("browser.safebrowsing.downloads.enabled", true);
pref("browser.safebrowsing.downloads.remote.enabled", true);
pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000);
pref("browser.safebrowsing.downloads.remote.url", "https://sb-ssl.google.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.downloads.remote.block_dangerous", true);
pref("browser.safebrowsing.downloads.remote.block_dangerous_host", true);
pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
pref("browser.safebrowsing.downloads.remote.block_uncommon", false);
pref("browser.safebrowsing.debug", false);
pref("browser.safebrowsing.provider.google.lists", "goog-badbinurl-shavar,goog-downloadwhite-digest256,goog-phish-shavar,goog-malware-shavar,goog-unwanted-shavar");
pref("browser.safebrowsing.provider.google.updateURL", "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2&key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.provider.google.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2");
pref("browser.safebrowsing.provider.google.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
pref("browser.safebrowsing.reportPhishMistakeURL", "https://%LOCALE%.phish-error.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportPhishURL", "https://%LOCALE%.phish-report.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportMalwareMistakeURL", "https://%LOCALE%.malware-error.mozilla.com/?hl=%LOCALE%&url=");
#ifdef MOZILLA_OFFICIAL
// Normally the "client ID" sent in updates is appinfo.name, but for
@ -811,18 +793,6 @@ pref("browser.safebrowsing.id", "navclient-auto-ffox");
// pages on phishing/malware hits. (bug 399233)
pref("urlclassifier.alternate_error_page", "blocked");
// The number of random entries to send with a gethash request.
pref("urlclassifier.gethashnoise", 4);
// Gethash timeout for Safebrowsing.
pref("urlclassifier.gethash.timeout_ms", 5000);
// If an urlclassifier table has not been updated in this number of seconds,
// a gethash request will be forced to check that the result is still in
// the database.
pref("urlclassifier.max-complete-age", 2700);
// Tables for application reputation.
pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar");
#ifdef XP_WIN
// Only download the whitelist on Windows, since the whitelist is
// only useful for suppressing remote lookups for signed binaries which we can

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

@ -468,13 +468,20 @@
onpopupshowing="if (!this.parentNode._placesView)
new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
</menu>
<menu id="menu_unsortedBookmarks"
class="menu-iconic bookmark-item"
label="&otherBookmarksCmd.label;"
container="true">
<menupopup id="otherBookmarksFolderPopup"
#ifndef XP_MACOSX
placespopup="true"
#endif
context="placesContext"
onpopupshowing="if (!this.parentNode._placesView)
new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS');"/>
</menu>
<menuseparator id="bookmarksMenuItemsSeparator"/>
<!-- Bookmarks menu items -->
<menuseparator builder="end"
class="hide-if-empty-places-result"/>
<menuitem id="menu_unsortedBookmarks"
label="&otherBookmarksCmd.label;"
oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"/>
</menupopup>
</menu>

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

@ -528,29 +528,36 @@ this.DownloadsCommon = {
* @param aOwnerWindow
* The window with which this action is associated.
*
* @return True to unblock the file, false to keep the user safe and
* cancel the operation.
* @return {Promise}
* @resolves String representing the action that should be executed:
* - "unblock" to allow the download without opening the file.
* - "confirmBlock" to delete the blocked data permanently.
* - "cancel" to do nothing and cancel the operation.
*/
confirmUnblockDownload: Task.async(function* (aVerdict, aOwnerWindow) {
let s = DownloadsCommon.strings;
let title = s.unblockHeader;
let buttonFlags = (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0) +
(Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1) +
Ci.nsIPrompt.BUTTON_POS_1_DEFAULT;
(Ci.nsIPrompt.BUTTON_TITLE_CANCEL * Ci.nsIPrompt.BUTTON_POS_1);
let type = "";
let message = s.unblockTip;
let okButton = s.unblockButtonContinue;
let cancelButton = s.unblockButtonCancel;
let unblockButton = s.unblockButtonContinue;
let confirmBlockButton = s.unblockButtonCancel;
switch (aVerdict) {
case Downloads.Error.BLOCK_VERDICT_UNCOMMON:
type = s.unblockTypeUncommon;
buttonFlags += (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2) +
Ci.nsIPrompt.BUTTON_POS_0_DEFAULT;
break;
case Downloads.Error.BLOCK_VERDICT_POTENTIALLY_UNWANTED:
type = s.unblockTypePotentiallyUnwanted;
buttonFlags += (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2) +
Ci.nsIPrompt.BUTTON_POS_2_DEFAULT;
break;
default: // Assume Downloads.Error.BLOCK_VERDICT_MALWARE
type = s.unblockTypeMalware;
buttonFlags += Ci.nsIPrompt.BUTTON_POS_1_DEFAULT;
break;
}
@ -580,8 +587,9 @@ this.DownloadsCommon = {
// The ordering of the ok/cancel buttons is used this way to allow "cancel"
// to have the same result as hitting the ESC or Close button (see bug 345067).
let rv = Services.prompt.confirmEx(aOwnerWindow, title, message, buttonFlags,
okButton, cancelButton, null, null, {});
return (rv == 0);
unblockButton, null, confirmBlockButton,
null, {});
return ["unblock", "cancel", "confirmBlock"][rv];
}),
};

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

@ -17,6 +17,8 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
"resource://gre/modules/Downloads.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils",
"resource://gre/modules/DownloadUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",
@ -112,6 +114,14 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
this.element.setAttribute("state",
DownloadsCommon.stateOfDownload(this.download));
if (this.download.error &&
this.download.error.becauseBlockedByReputationCheck) {
this.element.setAttribute("verdict",
this.download.error.reputationCheckVerdict);
} else {
this.element.removeAttribute("verdict");
}
// Since state changed, reset the time left estimation.
this.lastEstimatedSecondsLeft = Infinity;
@ -132,6 +142,11 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
}
}
// When a block is confirmed, the removal of blocked data will not trigger a
// state change for the download, so this class must be updated here.
this.element.classList.toggle("temporary-block",
!!this.download.hasBlockedData);
// The progress bar is only displayed for in-progress downloads.
if (this.download.hasProgress) {
this.element.setAttribute("progressmode", "normal");
@ -220,7 +235,17 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
} else if (this.download.error.becauseBlockedByParentalControls) {
stateLabel = s.stateBlockedParentalControls;
} else if (this.download.error.becauseBlockedByReputationCheck) {
stateLabel = s.stateDirty;
switch (this.download.error.reputationCheckVerdict) {
case Downloads.Error.BLOCK_VERDICT_UNCOMMON:
stateLabel = s.blockedUncommon;
break;
case Downloads.Error.BLOCK_VERDICT_POTENTIALLY_UNWANTED:
stateLabel = s.blockedPotentiallyUnwanted;
break;
default: // Assume Downloads.Error.BLOCK_VERDICT_MALWARE
stateLabel = s.blockedMalware;
break;
}
} else {
stateLabel = s.stateFailed;
}
@ -239,6 +264,25 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
return { text, tip: tip || text };
},
/**
* Shows the appropriate unblock dialog based on the verdict, and executes the
* action selected by the user in the dialog, which may involve unblocking,
* opening or removing the file.
*
* @param window
* The window to which the dialog should be anchored.
*/
confirmUnblock(window) {
let verdict = this.download.error.reputationCheckVerdict;
DownloadsCommon.confirmUnblockDownload(verdict, window).then(action => {
if (action == "unblock") {
return this.download.unblock();
} else if (action == "confirmBlock") {
return this.download.confirmBlock();
}
}).catch(Cu.reportError);
},
/**
* Returns the name of the default command to use for the current state of the
* download, when there is a double click or another default interaction. If

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

@ -298,9 +298,7 @@ HistoryDownloadElementShell.prototype = {
},
onStateChanged() {
this.element.setAttribute("image", this.image);
this.element.setAttribute("state",
DownloadsCommon.stateOfDownload(this.download));
this._updateState();
if (this.element.selected) {
goUpdateDownloadCommands();
@ -379,12 +377,7 @@ HistoryDownloadElementShell.prototype = {
},
downloadsCmd_unblock() {
let verdict = this.download.error.reputationCheckVerdict;
DownloadsCommon.confirmUnblockDownload(verdict, window).then(confirmed => {
if (confirmed) {
return this.download.unblock();
}
}).catch(Cu.reportError);
this.confirmUnblock(window);
},
// Returns whether or not the download handled by this shell should

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

@ -47,22 +47,25 @@
xbl:inherits="value=status,tooltiptext=statusTip"/>
</xul:vbox>
<xul:stack>
<xul:button class="downloadButton downloadCancel"
<xul:button class="downloadButton downloadCancel downloadIconCancel"
tooltiptext="&cmd.cancel.label;"
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_cancel');"/>
<xul:button class="downloadButton downloadRetry"
<xul:button class="downloadButton downloadRetry downloadIconRetry"
tooltiptext="&cmd.retry.label;"
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_retry');"/>
<xul:button class="downloadButton downloadShow"
<xul:button class="downloadButton downloadShow downloadIconShow"
#ifdef XP_MACOSX
tooltiptext="&cmd.showMac.label;"
#else
tooltiptext="&cmd.show.label;"
#endif
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_show');"/>
<xul:button class="downloadButton downloadConfirmBlock"
<xul:button class="downloadButton downloadConfirmBlock downloadIconCancel"
tooltiptext="&cmd.removeFile.label;"
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_confirmBlock');"/>
<xul:button class="downloadButton downloadUnblock downloadIconShow"
tooltiptext="&cmd.unblock.label;"
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_unblock');"/>
</xul:stack>
</content>
</binding>

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

@ -118,11 +118,22 @@ richlistitem.download button {
.downloadCancel,
/* Blocked (dirty) downloads that have not been confirmed and
have temporary data. */
have temporary data, for the Malware case. */
.download-state:not( [state="8"] /* Blocked (dirty) */)
.downloadConfirmBlock,
.download-state[state="8"]:not(.temporary-block)
.downloadConfirmBlock,
.download-state[state="8"].temporary-block:not([verdict="Malware"])
.downloadConfirmBlock,
/* Blocked (dirty) downloads that have not been confirmed and
have temporary data, for cases other than Malware. */
.download-state:not( [state="8"] /* Blocked (dirty) */)
.downloadUnblock,
.download-state[state="8"]:not(.temporary-block)
.downloadUnblock,
.download-state[state="8"].temporary-block[verdict="Malware"]
.downloadUnblock,
.download-state:not(:-moz-any([state="2"], /* Failed */
[state="3"]) /* Canceled */)

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

@ -1035,17 +1035,10 @@ DownloadsViewItem.prototype = {
_element: null,
onStateChanged() {
this.element.setAttribute("image", this.image);
this.element.setAttribute("state",
DownloadsCommon.stateOfDownload(this.download));
this._updateState();
},
onChanged() {
// This cannot be placed within onStateChanged because
// when a download goes from hasBlockedData to !hasBlockedData
// it will still remain in the same state.
this.element.classList.toggle("temporary-block",
!!this.download.hasBlockedData);
this._updateProgress();
},
@ -1099,12 +1092,7 @@ DownloadsViewItem.prototype = {
downloadsCmd_unblock() {
DownloadsPanel.hidePanel();
let verdict = this.download.error.reputationCheckVerdict;
DownloadsCommon.confirmUnblockDownload(verdict, window).then(confirmed => {
if (confirmed) {
return this.download.unblock();
}
}).catch(Cu.reportError);
this.confirmUnblock(window);
},
downloadsCmd_open() {

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

@ -35,12 +35,12 @@ add_task(function* test_confirm_unblock_dialog_unblock() {
addDialogOpenObserver("accept");
let result = yield DownloadsCommon.confirmUnblockDownload(Downloads.Error.BLOCK_VERDICT_MALWARE,
window);
ok(result, "Should return true when the user clicks on `Unblock` button.");
is(result, "unblock");
});
add_task(function* test_confirm_unblock_dialog_keep_safe() {
addDialogOpenObserver("cancel");
let result = yield DownloadsCommon.confirmUnblockDownload(Downloads.Error.BLOCK_VERDICT_MALWARE,
window);
ok(!result, "Should return false when the user clicks on `Keep me safe` button.");
is(result, "cancel");
});

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

@ -11,90 +11,90 @@
}
.blockedIcon {
list-style-image: url("moz-icon://stock/gtk-dialog-error?size=dialog");
list-style-image: url("moz-icon://stock/gtk-dialog-error?size=32");
}
@item@[verdict="PotentiallyUnwanted"] .blockedIcon {
list-style-image: url("moz-icon://stock/gtk-dialog-warning?size=32");
}
@item@[verdict="Uncommon"] .blockedIcon {
list-style-image: url("moz-icon://stock/gtk-dialog-info?size=32");
}
/*** Button icons ***/
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 64px, 16px, 48px);
}
@itemFocused@ .downloadButton.downloadConfirmBlock,
@itemFocused@ .downloadButton.downloadCancel {
@itemFocused@ .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 80px, 16px, 64px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock,
@itemFocused@:hover .downloadButton.downloadCancel {
@itemFocused@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 96px, 16px, 80px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:hover,
@itemFocused@:hover .downloadButton.downloadCancel:hover {
@itemFocused@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 112px, 16px, 96px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:active,
@itemFocused@:hover .downloadButton.downloadCancel:active {
@itemFocused@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 128px, 16px, 112px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
@item@:hover .downloadButton.downloadShow {
@item@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
@item@:hover .downloadButton.downloadShow:hover {
@item@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
@item@:hover .downloadButton.downloadShow:active {
@item@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 64px, 32px, 48px);
}
@itemFocused@ .downloadButton.downloadShow {
@itemFocused@ .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 80px, 32px, 64px);
}
@itemFocused@:hover .downloadButton.downloadShow {
@itemFocused@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 96px, 32px, 80px);
}
@itemFocused@:hover .downloadButton.downloadShow:hover {
@itemFocused@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 112px, 32px, 96px);
}
@itemFocused@:hover .downloadButton.downloadShow:active {
@itemFocused@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 128px, 32px, 112px);
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 48px, 48px, 32px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 64px, 48px, 48px);
}
@itemFocused@ .downloadButton.downloadRetry {
@itemFocused@ .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 80px, 48px, 64px);
}
@itemFocused@:hover .downloadButton.downloadRetry {
@itemFocused@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 96px, 48px, 80px);
}
@itemFocused@:hover .downloadButton.downloadRetry:hover {
@itemFocused@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 112px, 48px, 96px);
}
@itemFocused@:hover .downloadButton.downloadRetry:active {
@itemFocused@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 128px, 48px, 112px);
}

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

@ -37,7 +37,15 @@
}
.blockedIcon {
list-style-image: url("moz-icon://stock/gtk-dialog-error?size=dialog");
list-style-image: url("moz-icon://stock/gtk-dialog-error?size=32");
}
@item@[verdict="PotentiallyUnwanted"] .blockedIcon {
list-style-image: url("moz-icon://stock/gtk-dialog-warning?size=32");
}
@item@[verdict="Uncommon"] .blockedIcon {
list-style-image: url("moz-icon://stock/gtk-dialog-info?size=32");
}
.downloadButton:focus > .button-box {
@ -63,45 +71,50 @@
/*** Button icons ***/
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 64px, 16px, 48px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow {
@itemNotFinished@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
@itemNotFinished@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
@itemNotFinished@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 64px, 32px, 48px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 96px, 32px, 80px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:hover {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 112px, 32px, 96px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:active {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 128px, 32px, 112px);
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 48px, 48px, 32px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 64px, 48px, 48px);
}

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

@ -10,88 +10,88 @@
--downloads-item-height: 6em;
}
@item@[verdict="PotentiallyUnwanted"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/warning-32.png");
}
@item@[verdict="Uncommon"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/information-32.png");
}
/*** Button icons ***/
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 64px, 16px, 48px);
}
@itemFocused@ .downloadButton.downloadConfirmBlock,
@itemFocused@ .downloadButton.downloadCancel {
@itemFocused@ .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 80px, 16px, 64px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock,
@itemFocused@:hover .downloadButton.downloadCancel {
@itemFocused@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 96px, 16px, 80px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:hover,
@itemFocused@:hover .downloadButton.downloadCancel:hover {
@itemFocused@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 112px, 16px, 96px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:active,
@itemFocused@:hover .downloadButton.downloadCancel:active {
@itemFocused@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 128px, 16px, 112px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
@item@:hover .downloadButton.downloadShow {
@item@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
@item@:hover .downloadButton.downloadShow:hover {
@item@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
@item@:hover .downloadButton.downloadShow:active {
@item@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 64px, 32px, 48px);
}
@itemFocused@ .downloadButton.downloadShow {
@itemFocused@ .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 80px, 32px, 64px);
}
@itemFocused@:hover .downloadButton.downloadShow {
@itemFocused@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 96px, 32px, 80px);
}
@itemFocused@:hover .downloadButton.downloadShow:hover {
@itemFocused@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 112px, 32px, 96px);
}
@itemFocused@:hover .downloadButton.downloadShow:active {
@itemFocused@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 128px, 32px, 112px);
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 48px, 48px, 32px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 64px, 48px, 48px);
}
@itemFocused@ .downloadButton.downloadRetry {
@itemFocused@ .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 80px, 48px, 64px);
}
@itemFocused@:hover .downloadButton.downloadRetry {
@itemFocused@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 96px, 48px, 80px);
}
@itemFocused@:hover .downloadButton.downloadRetry:hover {
@itemFocused@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 112px, 48px, 96px);
}
@itemFocused@:hover .downloadButton.downloadRetry:active {
@itemFocused@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 128px, 48px, 112px);
}
@ -104,86 +104,78 @@
height: 16px;
}
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 32px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 64px, 32px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 96px, 32px, 64px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 128px, 32px, 96px);
}
@itemFocused@ .downloadButton.downloadConfirmBlock,
@itemFocused@ .downloadButton.downloadCancel {
@itemFocused@ .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 160px, 32px, 128px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock,
@itemFocused@:hover .downloadButton.downloadCancel {
@itemFocused@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 192px, 32px, 160px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:hover,
@itemFocused@:hover .downloadButton.downloadCancel:hover {
@itemFocused@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 224px, 32px, 192px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:active,
@itemFocused@:hover .downloadButton.downloadCancel:active {
@itemFocused@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 256px, 32px, 224px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 32px, 64px, 0px);
}
@item@:hover .downloadButton.downloadShow {
@item@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 64px, 64px, 32px);
}
@item@:hover .downloadButton.downloadShow:hover {
@item@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(32px, 96px, 64px, 64px);
}
@item@:hover .downloadButton.downloadShow:active {
@item@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(32px, 128px, 64px, 96px);
}
@itemFocused@ .downloadButton.downloadShow {
@itemFocused@ .downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 160px, 64px, 128px);
}
@itemFocused@:hover .downloadButton.downloadShow {
@itemFocused@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 192px, 64px, 160px);
}
@itemFocused@:hover .downloadButton.downloadShow:hover {
@itemFocused@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(32px, 224px, 64px, 192px);
}
@itemFocused@:hover .downloadButton.downloadShow:active {
@itemFocused@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(32px, 256px, 64px, 224px);
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 32px, 96px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 64px, 96px, 32px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(64px, 96px, 96px, 64px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(64px, 128px, 96px, 96px);
}
@itemFocused@ .downloadButton.downloadRetry {
@itemFocused@ .downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 160px, 96px, 128px);
}
@itemFocused@:hover .downloadButton.downloadRetry {
@itemFocused@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 192px, 96px, 160px);
}
@itemFocused@:hover .downloadButton.downloadRetry:hover {
@itemFocused@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(64px, 224px, 96px, 192px);
}
@itemFocused@:hover .downloadButton.downloadRetry:active {
@itemFocused@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(64px, 256px, 96px, 224px);
}
}

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

@ -47,6 +47,14 @@
outline-offset: -2px;
}
@item@[verdict="PotentiallyUnwanted"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/warning-32.png");
}
@item@[verdict="Uncommon"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/information-32.png");
}
/*** Highlighted list items ***/
@keyfocus@ @itemFocused@,
@ -64,89 +72,84 @@
/*** Button icons ***/
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 64px, 16px, 48px);
}
@keyfocus@ @itemFocused@ .downloadButton.downloadConfirmBlock,
@keyfocus@ @itemFocused@ .downloadButton.downloadCancel {
@keyfocus@ @itemFocused@ .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 80px, 16px, 64px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadConfirmBlock,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadCancel {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 96px, 16px, 80px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadConfirmBlock:hover,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadCancel:hover {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 112px, 16px, 96px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadConfirmBlock:active,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadCancel:active {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 128px, 16px, 112px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadShow {
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow,
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadShow:hover {
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:hover,
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadShow:active {
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:active,
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 64px, 32px, 48px);
}
@keyfocus@ @itemFocused@ .downloadButton.downloadShow {
@keyfocus@ @itemFocused@ .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 80px, 32px, 64px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadShow {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 96px, 32px, 80px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:hover,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadShow:hover {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:hover,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 112px, 32px, 96px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:active,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadShow:active {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:active,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 128px, 32px, 112px);
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 48px, 48px, 32px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 64px, 48px, 48px);
}
@keyfocus@ @itemFocused@ .downloadButton.downloadRetry {
@keyfocus@ @itemFocused@ .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 80px, 48px, 64px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadRetry {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 96px, 48px, 80px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadRetry:hover {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 112px, 48px, 96px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadRetry:active {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 128px, 48px, 112px);
}
@ -159,89 +162,84 @@
height: 16px;
}
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 32px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 64px, 32px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 96px, 32px, 64px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 128px, 32px, 96px);
}
@keyfocus@ @itemFocused@ .downloadButton.downloadConfirmBlock,
@keyfocus@ @itemFocused@ .downloadButton.downloadCancel {
@keyfocus@ @itemFocused@ .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 160px, 32px, 128px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadConfirmBlock,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadCancel {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 192px, 32px, 160px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadConfirmBlock:hover,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadCancel:hover {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 224px, 32px, 192px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadConfirmBlock:active,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadCancel:active {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 256px, 32px, 224px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 32px, 64px, 0px);
}
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadShow {
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow,
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 64px, 64px, 32px);
}
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadShow:hover {
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:hover,
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(32px, 96px, 64px, 64px);
}
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadShow:active {
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:active,
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:active {
-moz-image-region: rect(32px, 128px, 64px, 96px);
}
@keyfocus@ @itemFocused@ .downloadButton.downloadShow {
@keyfocus@ @itemFocused@ .downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 160px, 64px, 128px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadShow {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(32px, 192px, 64px, 160px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:hover,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadShow:hover {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:hover,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(32px, 224px, 64px, 192px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:active,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadShow:active {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:active,
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(32px, 256px, 64px, 224px);
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 32px, 96px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 64px, 96px, 32px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(64px, 96px, 96px, 64px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(64px, 128px, 96px, 96px);
}
@keyfocus@ @itemFocused@ .downloadButton.downloadRetry {
@keyfocus@ @itemFocused@ .downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 160px, 96px, 128px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadRetry {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(64px, 192px, 96px, 160px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadRetry:hover {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(64px, 224px, 96px, 192px);
}
@keyfocus@ @itemFocused@:hover .downloadButton.downloadRetry:active {
@keyfocus@ @itemFocused@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(64px, 256px, 96px, 224px);
}
}

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

@ -8,6 +8,7 @@
%define notKeyfocus #downloadsPanel:not([keyfocus])
%define item richlistitem[type="download"]
%define itemFinished @item@[state="1"]
%define itemNotFinished @item@:not([state="1"])
%define itemFocused #downloadsListBox:focus > @item@[selected]
/*** Panel and outer controls ***/

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

@ -10,6 +10,14 @@
--downloads-item-height: 6em;
}
@item@[verdict="PotentiallyUnwanted"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/Warning.png");
}
@item@[verdict="Uncommon"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/information-32.png");
}
/*** Highlighted list items ***/
@media not all and (-moz-os-version: windows-xp) {
@ -44,90 +52,82 @@
/*** Button icons ***/
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 64px, 16px, 48px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
@item@:hover .downloadButton.downloadShow {
@item@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
@item@:hover .downloadButton.downloadShow:hover {
@item@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
@item@:hover .downloadButton.downloadShow:active {
@item@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 64px, 32px, 48px);
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 48px, 48px, 32px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 64px, 48px, 48px);
}
@media (-moz-os-version: windows-xp) {
@itemFocused@ .downloadButton.downloadConfirmBlock,
@itemFocused@ .downloadButton.downloadCancel {
@itemFocused@ .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 80px, 16px, 64px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock,
@itemFocused@:hover .downloadButton.downloadCancel {
@itemFocused@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 96px, 16px, 80px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:hover,
@itemFocused@:hover .downloadButton.downloadCancel:hover {
@itemFocused@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 112px, 16px, 96px);
}
@itemFocused@:hover .downloadButton.downloadConfirmBlock:active,
@itemFocused@:hover .downloadButton.downloadCancel:active {
@itemFocused@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 128px, 16px, 112px);
}
@itemFocused@ .downloadButton.downloadShow {
@itemFocused@ .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 80px, 32px, 64px);
}
@itemFocused@:hover .downloadButton.downloadShow {
@itemFocused@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 96px, 32px, 80px);
}
@itemFocused@:hover .downloadButton.downloadShow:hover {
@itemFocused@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 112px, 32px, 96px);
}
@itemFocused@:hover .downloadButton.downloadShow:active {
@itemFocused@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 128px, 32px, 112px);
}
@itemFocused@ .downloadButton.downloadRetry {
@itemFocused@ .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 80px, 48px, 64px);
}
@itemFocused@:hover .downloadButton.downloadRetry {
@itemFocused@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 96px, 48px, 80px);
}
@itemFocused@:hover .downloadButton.downloadRetry:hover {
@itemFocused@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 112px, 48px, 96px);
}
@itemFocused@:hover .downloadButton.downloadRetry:active {
@itemFocused@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 128px, 48px, 112px);
}
}

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

@ -96,6 +96,14 @@
border: 1px dotted ThreeDDarkShadow;
}
@item@[verdict="PotentiallyUnwanted"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/Warning.png");
}
@item@[verdict="Uncommon"] .blockedIcon {
list-style-image: url("chrome://global/skin/icons/information-32.png");
}
/*** Highlighted list items ***/
@keyfocus@ @itemFocused@ {
@ -148,65 +156,61 @@
/*** Button icons ***/
.downloadButton.downloadConfirmBlock,
.downloadButton.downloadCancel {
.downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
@item@:hover .downloadButton.downloadConfirmBlock,
@item@:hover .downloadButton.downloadCancel {
@item@:hover .downloadButton.downloadIconCancel {
-moz-image-region: rect(0px, 32px, 16px, 16px);
}
@item@:hover .downloadButton.downloadConfirmBlock:hover,
@item@:hover .downloadButton.downloadCancel:hover {
@item@:hover .downloadButton.downloadIconCancel:hover {
-moz-image-region: rect(0px, 48px, 16px, 32px);
}
@item@:hover .downloadButton.downloadConfirmBlock:active,
@item@:hover .downloadButton.downloadCancel:active {
@item@:hover .downloadButton.downloadIconCancel:active {
-moz-image-region: rect(0px, 64px, 16px, 48px);
}
.downloadButton.downloadShow {
.downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 16px, 32px, 0px);
}
@item@:hover .downloadButton.downloadShow {
@item@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
@item@:hover .downloadButton.downloadShow:hover {
@item@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
@item@:hover .downloadButton.downloadShow:active {
@item@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 64px, 32px, 48px);
}
@media (-moz-os-version: windows-xp) {
@keyfocus@ @itemFinished@:hover .downloadButton.downloadShow {
@keyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
@keyfocus@ @itemFinished@:hover .downloadButton.downloadShow:hover {
@keyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 48px, 32px, 32px);
}
@keyfocus@ @itemFinished@:hover .downloadButton.downloadShow:active {
@keyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 64px, 32px, 48px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow {
-moz-image-region: rect(16px, 96px, 32px, 80px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:hover {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:hover {
-moz-image-region: rect(16px, 112px, 32px, 96px);
}
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadShow:active {
@notKeyfocus@ @itemFinished@:hover .downloadButton.downloadIconShow:active {
-moz-image-region: rect(16px, 128px, 32px, 112px);
}
}
.downloadButton.downloadRetry {
.downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
@item@:hover .downloadButton.downloadRetry {
@item@:hover .downloadButton.downloadIconRetry {
-moz-image-region: rect(32px, 32px, 48px, 16px);
}
@item@:hover .downloadButton.downloadRetry:hover {
@item@:hover .downloadButton.downloadIconRetry:hover {
-moz-image-region: rect(32px, 48px, 48px, 32px);
}
@item@:hover .downloadButton.downloadRetry:active {
@item@:hover .downloadButton.downloadIconRetry:active {
-moz-image-region: rect(32px, 64px, 48px, 48px);
}

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

@ -14,7 +14,8 @@ const EventEmitter = require("devtools/shared/event-emitter");
* const {Spectrum} = require("devtools/client/shared/widgets/Spectrum");
* let s = new Spectrum(containerElement, [255, 126, 255, 1]);
* s.on("changed", (event, rgba, color) => {
* console.log("rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ", " + rgba[3] + ")");
* console.log("rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ", " +
* rgba[3] + ")");
* });
* s.show();
* s.destroy();
@ -31,32 +32,32 @@ const EventEmitter = require("devtools/shared/event-emitter");
function Spectrum(parentEl, rgb) {
EventEmitter.decorate(this);
this.element = parentEl.ownerDocument.createElement('div');
this.element = parentEl.ownerDocument.createElement("div");
this.parentEl = parentEl;
this.element.className = "spectrum-container";
this.element.innerHTML = [
"<div class='spectrum-top'>",
"<div class='spectrum-fill'></div>",
"<div class='spectrum-top-inner'>",
"<div class='spectrum-color spectrum-box'>",
"<div class='spectrum-sat'>",
"<div class='spectrum-val'>",
"<div class='spectrum-dragger'></div>",
"</div>",
"</div>",
"</div>",
"<div class='spectrum-hue spectrum-box'>",
"<div class='spectrum-slider spectrum-slider-control'></div>",
"</div>",
"</div>",
"</div>",
"<div class='spectrum-alpha spectrum-checker spectrum-box'>",
"<div class='spectrum-alpha-inner'>",
"<div class='spectrum-alpha-handle spectrum-slider-control'></div>",
"</div>",
"</div>",
].join("");
this.element.innerHTML = `
<div class="spectrum-top">
<div class="spectrum-fill"></div>
<div class="spectrum-top-inner">
<div class="spectrum-color spectrum-box">
<div class="spectrum-sat">
<div class="spectrum-val">
<div class="spectrum-dragger"></div>
</div>
</div>
</div>
<div class="spectrum-hue spectrum-box">
<div class="spectrum-slider spectrum-slider-control"></div>
</div>
</div>
</div>
<div class="spectrum-alpha spectrum-checker spectrum-box">
<div class="spectrum-alpha-inner">
<div class="spectrum-alpha-handle spectrum-slider-control"></div>
</div>
</div>
`;
this.onElementClick = this.onElementClick.bind(this);
this.element.addEventListener("click", this.onElementClick, false);
@ -94,12 +95,12 @@ Spectrum.hsvToRgb = function(h, s, v, a) {
let t = v * (1 - (1 - f) * s);
switch(i % 6) {
case 0: r = v, g = t, b = p; break;
case 1: r = q, g = v, b = p; break;
case 2: r = p, g = v, b = t; break;
case 3: r = p, g = q, b = v; break;
case 4: r = t, g = p, b = v; break;
case 5: r = v, g = p, b = q; break;
case 0: r = v; g = t; b = p; break;
case 1: r = q; g = v; b = p; break;
case 2: r = p; g = v; b = t; break;
case 3: r = p; g = q; b = v; break;
case 4: r = t; g = p; b = v; break;
case 5: r = v; g = p; b = q; break;
}
return [r * 255, g * 255, b * 255, a];
@ -116,10 +117,10 @@ Spectrum.rgbToHsv = function(r, g, b, a) {
let d = max - min;
s = max == 0 ? 0 : d / max;
if(max == min) {
h = 0; // achromatic
}
else {
if (max == min) {
// achromatic
h = 0;
} else {
switch(max) {
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
case g: h = (b - r) / d + 2; break;
@ -220,8 +221,10 @@ Spectrum.prototype = {
},
get rgb() {
let rgb = Spectrum.hsvToRgb(this.hsv[0], this.hsv[1], this.hsv[2], this.hsv[3]);
return [Math.round(rgb[0]), Math.round(rgb[1]), Math.round(rgb[2]), Math.round(rgb[3]*100)/100];
let rgb = Spectrum.hsvToRgb(this.hsv[0], this.hsv[1], this.hsv[2],
this.hsv[3]);
return [Math.round(rgb[0]), Math.round(rgb[1]), Math.round(rgb[2]),
Math.round(rgb[3] * 100) / 100];
},
get rgbNoSatVal() {
@ -231,11 +234,12 @@ Spectrum.prototype = {
get rgbCssString() {
let rgb = this.rgb;
return "rgba(" + rgb[0] + ", " + rgb[1] + ", " + rgb[2] + ", " + rgb[3] + ")";
return "rgba(" + rgb[0] + ", " + rgb[1] + ", " + rgb[2] + ", " +
rgb[3] + ")";
},
show: function() {
this.element.classList.add('spectrum-show');
this.element.classList.add("spectrum-show");
this.slideHeight = this.slider.offsetHeight;
this.dragWidth = this.dragger.offsetWidth;
@ -276,9 +280,11 @@ Spectrum.prototype = {
},
updateHelperLocations: function() {
// If the UI hasn't been shown yet then none of the dimensions will be correct
if (!this.element.classList.contains('spectrum-show'))
// If the UI hasn't been shown yet then none of the dimensions will be
// correct
if (!this.element.classList.contains("spectrum-show")) {
return;
}
let h = this.hsv[0];
let s = this.hsv[1];
@ -287,7 +293,7 @@ Spectrum.prototype = {
// Placing the color dragger
let dragX = s * this.dragWidth;
let dragY = this.dragHeight - (v * this.dragHeight);
let helperDim = this.dragHelperHeight/2;
let helperDim = this.dragHelperHeight / 2;
dragX = Math.max(
-helperDim,
@ -302,11 +308,12 @@ Spectrum.prototype = {
this.dragHelper.style.left = dragX + "px";
// Placing the hue slider
let slideY = (h * this.slideHeight) - this.slideHelperHeight/2;
let slideY = (h * this.slideHeight) - this.slideHelperHeight / 2;
this.slideHelper.style.top = slideY + "px";
// Placing the alpha slider
let alphaSliderX = (this.hsv[3] * this.alphaSliderWidth) - (this.alphaSliderHelperWidth / 2);
let alphaSliderX = (this.hsv[3] * this.alphaSliderWidth) -
(this.alphaSliderHelperWidth / 2);
this.alphaSliderHelper.style.left = alphaSliderX + "px";
},
@ -316,14 +323,15 @@ Spectrum.prototype = {
let rgb = this.rgb;
let rgbNoSatVal = this.rgbNoSatVal;
let flatColor = "rgb(" + rgbNoSatVal[0] + ", " + rgbNoSatVal[1] + ", " + rgbNoSatVal[2] + ")";
let fullColor = "rgba(" + rgb[0] + ", " + rgb[1] + ", " + rgb[2] + ", " + rgb[3] + ")";
let flatColor = "rgb(" + rgbNoSatVal[0] + ", " + rgbNoSatVal[1] + ", " +
rgbNoSatVal[2] + ")";
this.dragger.style.backgroundColor = flatColor;
var rgbNoAlpha = "rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ")";
var rgbAlpha0 = "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ", 0)";
var alphaGradient = "linear-gradient(to right, " + rgbAlpha0 + ", " + rgbNoAlpha + ")";
let rgbNoAlpha = "rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ")";
let rgbAlpha0 = "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ", 0)";
let alphaGradient = "linear-gradient(to right, " + rgbAlpha0 + ", " +
rgbNoAlpha + ")";
this.alphaSliderInner.style.background = alphaGradient;
},

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

@ -109,7 +109,6 @@
.theme-firebug .netInfoBody > .tabs .tabs-menu-item.is-active a:focus {
border: 1px solid var(--net-border);
border-bottom-color: transparent;
border-color: var(--net-border);
}
.theme-firebug .netInfoBody > .tabs .tabs-menu-item:hover a {

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

@ -305,9 +305,6 @@ pref("browser.search.order.US.3", "chrome://browser/locale/region.properties");
// disable updating
pref("browser.search.update", false);
// enable tracking protection for private browsing
pref("privacy.trackingprotection.pbmode.enabled", true);
// disable search suggestions by default
pref("browser.search.suggest.enabled", false);
pref("browser.search.suggest.prompted", false);
@ -649,46 +646,14 @@ pref("media.mediasource.enabled", true);
pref("image.downscale-during-decode.enabled", true);
#ifdef MOZ_SAFE_BROWSING
pref("browser.safebrowsing.enabled", true);
pref("browser.safebrowsing.malware.enabled", true);
pref("browser.safebrowsing.downloads.enabled", false);
pref("browser.safebrowsing.downloads.remote.enabled", false);
pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000);
pref("browser.safebrowsing.downloads.remote.url", "https://sb-ssl.google.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.downloads.remote.block_dangerous", true);
pref("browser.safebrowsing.downloads.remote.block_dangerous_host", true);
pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
pref("browser.safebrowsing.downloads.remote.block_uncommon", false);
pref("browser.safebrowsing.debug", false);
pref("browser.safebrowsing.provider.google.lists", "goog-badbinurl-shavar,goog-downloadwhite-digest256,goog-phish-shavar,goog-malware-shavar,goog-unwanted-shavar");
pref("browser.safebrowsing.provider.google.updateURL", "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2&key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.provider.google.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2");
pref("browser.safebrowsing.provider.google.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
pref("browser.safebrowsing.reportPhishMistakeURL", "https://%LOCALE%.phish-error.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportPhishURL", "https://%LOCALE%.phish-report.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportMalwareMistakeURL", "https://%LOCALE%.malware-error.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.id", @MOZ_APP_UA_NAME@);
// Name of the about: page contributed by safebrowsing to handle display of error
// pages on phishing/malware hits. (bug 399233)
pref("urlclassifier.alternate_error_page", "blocked");
// The number of random entries to send with a gethash request.
pref("urlclassifier.gethashnoise", 4);
// Gethash timeout for Safebrowsing.
pref("urlclassifier.gethash.timeout_ms", 5000);
// If an urlclassifier table has not been updated in this number of seconds,
// a gethash request will be forced to check that the result is still in
// the database.
pref("urlclassifier.max-complete-age", 2700);
// Tables for application reputation.
pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar");
#endif
// True if this is the first time we are showing about:firstrun

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

@ -47,6 +47,11 @@ import java.util.ArrayList;
* * Note: when the application starts for testing, it may need to upgrade the database from your existing version. If
* this fails, the application will crash and the test may fail to start.
*
* IMPORTANT:
* Test DBs must be created on the oldest version of Android that is currently supported. SQLite
* is not forwards compatible. E.g. uploading a DB created on a 6.0 device will cause failures
* when robocop tests running on 4.3 are unable to load it.
*
* Implementation inspired by:
* http://riggaroo.co.za/automated-testing-sqlite-database-upgrades-android/
*/

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

@ -4957,6 +4957,7 @@ pref("dom.inter-app-communication-api.enabled", false);
// Disable mapped array buffer by default.
pref("dom.mapped_arraybuffer.enabled", false);
#ifdef MOZ_SAFE_BROWSING
// The tables used for Safebrowsing phishing and malware checks.
pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,test-malware-simple,test-unwanted-simple");
pref("urlclassifier.phishTable", "goog-phish-shavar,test-phish-simple");
@ -4969,6 +4970,41 @@ pref("urlclassifier.disallow_completions", "test-malware-simple,test-phish-simpl
pref("urlclassifier.trackingTable", "test-track-simple,mozstd-track-digest256");
pref("urlclassifier.trackingWhitelistTable", "test-trackwhite-simple,mozstd-trackwhite-digest256");
// Tables for application reputation.
pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar");
// The number of random entries to send with a gethash request.
pref("urlclassifier.gethashnoise", 4);
// Gethash timeout for Safebrowsing.
pref("urlclassifier.gethash.timeout_ms", 5000);
// If an urlclassifier table has not been updated in this number of seconds,
// a gethash request will be forced to check that the result is still in
// the database.
pref("urlclassifier.max-complete-age", 2700);
pref("browser.safebrowsing.enabled", true);
pref("browser.safebrowsing.malware.enabled", true);
pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000);
pref("browser.safebrowsing.downloads.remote.url", "https://sb-ssl.google.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.downloads.remote.block_dangerous", true);
pref("browser.safebrowsing.downloads.remote.block_dangerous_host", true);
pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
pref("browser.safebrowsing.downloads.remote.block_uncommon", false);
pref("browser.safebrowsing.debug", false);
pref("browser.safebrowsing.provider.google.lists", "goog-badbinurl-shavar,goog-downloadwhite-digest256,goog-phish-shavar,goog-malware-shavar,goog-unwanted-shavar");
pref("browser.safebrowsing.provider.google.updateURL", "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2&key=%GOOGLE_API_KEY%");
pref("browser.safebrowsing.provider.google.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2");
pref("browser.safebrowsing.provider.google.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
pref("browser.safebrowsing.reportPhishMistakeURL", "https://%LOCALE%.phish-error.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportPhishURL", "https://%LOCALE%.phish-report.mozilla.com/?hl=%LOCALE%&url=");
pref("browser.safebrowsing.reportMalwareMistakeURL", "https://%LOCALE%.malware-error.mozilla.com/?hl=%LOCALE%&url=");
// The table and global pref for blocking access to sites forbidden by policy
pref("browser.safebrowsing.forbiddenURIs.enabled", false);
pref("urlclassifier.forbiddenTable", "test-forbid-simple");
@ -4991,6 +5027,7 @@ pref("browser.safebrowsing.provider.mozilla.lists.mozfull.description", "mozfull
// Allow users to ignore Safe Browsing warnings.
pref("browser.safebrowsing.allowOverride", true);
#endif
// Turn off Spatial navigation by default.
pref("snav.enabled", false);

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

@ -5,6 +5,12 @@
/*** =================== SAVED SIGNONS CODE =================== ***/
Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask",
"resource://gre/modules/DeferredTask.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
var kSignonBundle;
var showingPasswords = false;
@ -44,16 +50,46 @@ function setFilter(aFilterString) {
}
var signonsTreeView = {
_filterSet : [],
_lastSelectedRanges : [],
// Keep track of which favicons we've fetched or started fetching.
// Maps a login origin to a favicon URL.
_faviconMap: new Map(),
_filterSet: [],
// Coalesce invalidations to avoid repeated flickering.
_invalidateTask: new DeferredTask(() => {
signonsTree.treeBoxObject.invalidateColumn(signonsTree.columns.siteCol);
}, 10),
_lastSelectedRanges: [],
selection: null,
rowCount : 0,
setTree : function(tree) {},
getImageSrc : function(row,column) {},
getProgressMode : function(row,column) {},
getCellValue : function(row,column) {},
getCellText : function(row,column) {
rowCount: 0,
setTree(tree) {},
getImageSrc(row, column) {
if (column.element.getAttribute("id") !== "siteCol") {
return "";
}
const signon = this._filterSet.length ? this._filterSet[row] : signons[row];
// We already have the favicon URL or we started to fetch (value is null).
if (this._faviconMap.has(signon.hostname)) {
return this._faviconMap.get(signon.hostname);
}
// Record the fact that we already starting fetching a favicon for this
// origin in order to avoid multiple requests for the same origin.
this._faviconMap.set(signon.hostname, null);
PlacesUtils.promiseFaviconLinkUrl(signon.hostname)
.then(faviconURI => {
this._faviconMap.set(signon.hostname, faviconURI.spec);
this._invalidateTask.arm();
}).catch(Cu.reportError);
return "";
},
getProgressMode(row, column) {},
getCellValue(row, column) {},
getCellText(row, column) {
var time;
var signon = this._filterSet.length ? this._filterSet[row] : signons[row];
switch (column.id) {
@ -80,25 +116,25 @@ var signonsTreeView = {
return "";
}
},
isEditable : function(row, col) {
isEditable(row, col) {
if (col.id == "userCol" || col.id == "passwordCol") {
return true;
}
return false;
},
isSeparator : function(index) { return false; },
isSorted : function() { return false; },
isContainer : function(index) { return false; },
cycleHeader : function(column) {},
getRowProperties : function(row) { return ""; },
getColumnProperties : function(column) { return ""; },
getCellProperties : function(row,column) {
isSeparator(index) { return false; },
isSorted() { return false; },
isContainer(index) { return false; },
cycleHeader(column) {},
getRowProperties(row) { return ""; },
getColumnProperties(column) { return ""; },
getCellProperties(row, column) {
if (column.element.getAttribute("id") == "siteCol")
return "ltr";
return "";
},
setCellText : function(row, col, value) {
setCellText(row, col, value) {
// If there is a filter, _filterSet needs to be used, otherwise signons is used.
let table = signonsTreeView._filterSet.length ? signonsTreeView._filterSet : signons;
function _editLogin(field) {
@ -224,7 +260,7 @@ function AskUserShowPasswords() {
}
function FinalizeSignonDeletions(syncNeeded) {
for (var s=0; s<deletedSignons.length; s++) {
for (var s = 0; s < deletedSignons.length; s++) {
passwordmanager.removeLogin(deletedSignons[s]);
Services.telemetry.getHistogramById("PWMGR_MANAGE_DELETED").add(1);
}
@ -360,8 +396,7 @@ function SignonSaveState() {
}
}
function _filterPasswords()
{
function _filterPasswords() {
var filter = document.getElementById("filter").value;
if (filter == "") {
SignonClearFilter();

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

@ -29,7 +29,6 @@ toolkit.jar:
* skin/classic/global/notification.css
skin/classic/global/netError.css
skin/classic/global/numberbox.css
skin/classic/global/passwordmgr.css
skin/classic/global/popup.css
skin/classic/global/preferences.css
skin/classic/global/progressmeter.css

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

@ -46,6 +46,7 @@ toolkit.jar:
skin/classic/global/in-content/dropdown.svg (../../shared/in-content/dropdown.svg)
skin/classic/global/in-content/help-glyph.svg (../../shared/in-content/help-glyph.svg)
skin/classic/global/in-content/radio.svg (../../shared/in-content/radio.svg)
skin/classic/global/passwordmgr.css (../../shared/passwordmgr.css)
skin/classic/global/reader/RM-Close-24x24.svg (../../shared/reader/RM-Close-24x24.svg)
skin/classic/global/reader/RM-Minus-24x24.svg (../../shared/reader/RM-Minus-24x24.svg)
skin/classic/global/reader/RM-Plus-24x24.svg (../../shared/reader/RM-Plus-24x24.svg)

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

@ -18,7 +18,6 @@
skin/classic/global/filefield.css (../../windows/global/filefield.css)
skin/classic/global/globalBindings.xml (../../windows/global/globalBindings.xml)
skin/classic/global/linkTree.css (../../windows/global/linkTree.css)
skin/classic/global/passwordmgr.css (../../windows/global/passwordmgr.css)
skin/classic/global/progressmeter.css (../../windows/global/progressmeter.css)
skin/classic/global/resizer.css (../../windows/global/resizer.css)
skin/classic/global/richlistbox.css (../../windows/global/richlistbox.css)

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

@ -11,3 +11,16 @@
.actionButtons {
margin: 0px 3px 6px 3px !important;
}
treechildren::-moz-tree-image(siteCol) {
list-style-image: url(chrome://mozapps/skin/places/defaultFavicon.png);
width: 16px;
height: 16px;
-moz-margin-end: 5px;
}
@media (min-resolution: 1.1dppx) {
treechildren::-moz-tree-image(siteCol) {
list-style-image: url(chrome://mozapps/skin/places/defaultFavicon@2x.png);
}
}

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

@ -1,13 +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/. */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.contentPane {
margin: 9px 8px 5px 8px;
}
.actionButtons {
margin: 0px 3px 6px 3px !important;
}