зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1198181 - Part 3 - Showing the unblock dialog should be the visible action for verdicts other than malware. r=past
MozReview-Commit-ID: GJNojR8L3Mx --HG-- extra : rebase_source : 2626cf280548ff60b4c5cf316513757082617e28
This commit is contained in:
Родитель
916f990002
Коммит
139f20eff9
|
@ -112,6 +112,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;
|
||||
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
<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 */)
|
||||
|
|
|
@ -79,6 +79,15 @@
|
|||
.downloadButton.downloadIconShow {
|
||||
-moz-image-region: rect(16px, 16px, 32px, 0px);
|
||||
}
|
||||
@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);
|
||||
}
|
||||
|
|
|
@ -92,12 +92,15 @@
|
|||
.downloadButton.downloadIconShow {
|
||||
-moz-image-region: rect(16px, 16px, 32px, 0px);
|
||||
}
|
||||
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow,
|
||||
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow {
|
||||
-moz-image-region: rect(16px, 32px, 32px, 16px);
|
||||
}
|
||||
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:hover,
|
||||
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:hover {
|
||||
-moz-image-region: rect(16px, 48px, 32px, 32px);
|
||||
}
|
||||
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:active,
|
||||
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:active {
|
||||
-moz-image-region: rect(16px, 64px, 32px, 48px);
|
||||
}
|
||||
|
@ -179,12 +182,15 @@
|
|||
.downloadButton.downloadIconShow {
|
||||
-moz-image-region: rect(32px, 32px, 64px, 0px);
|
||||
}
|
||||
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow,
|
||||
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow {
|
||||
-moz-image-region: rect(32px, 64px, 64px, 32px);
|
||||
}
|
||||
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:hover,
|
||||
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:hover {
|
||||
-moz-image-region: rect(32px, 96px, 64px, 64px);
|
||||
}
|
||||
@notKeyfocus@ @itemNotFinished@:hover .downloadButton.downloadIconShow:active,
|
||||
@keyfocus@ @itemFinished@:hover:not([selected]) .downloadButton.downloadIconShow:active {
|
||||
-moz-image-region: rect(32px, 128px, 64px, 96px);
|
||||
}
|
||||
|
|
|
@ -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 ***/
|
||||
|
|
Загрузка…
Ссылка в новой задаче