Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | /* ===== checkbox.css =================================================== |
michael@0 | 6 | == Styles used by the XUL checkbox element. |
michael@0 | 7 | ======================================================================= */ |
michael@0 | 8 | |
michael@0 | 9 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); |
michael@0 | 10 | |
michael@0 | 11 | /* ::::: checkbox ::::: */ |
michael@0 | 12 | |
michael@0 | 13 | checkbox { |
michael@0 | 14 | -moz-appearance: checkbox-container; |
michael@0 | 15 | margin: 2px 4px; |
michael@0 | 16 | border-left: 2px transparent; |
michael@0 | 17 | border-right: 2px transparent; |
michael@0 | 18 | } |
michael@0 | 19 | |
michael@0 | 20 | /* With native theming on, the spacer-box paints the check mark and includes |
michael@0 | 21 | the spacing to the right, so that oversized checkbox images can slop over |
michael@0 | 22 | into the space. |
michael@0 | 23 | |
michael@0 | 24 | If we need to disable checkbox theming, the spacer box no longer paints |
michael@0 | 25 | the check mark, but its fallback CSS border supplies the padding between |
michael@0 | 26 | the mark and the label. The xul:image then takes over painting the check |
michael@0 | 27 | mark. */ |
michael@0 | 28 | |
michael@0 | 29 | .checkbox-spacer-box { |
michael@0 | 30 | -moz-appearance: checkbox; |
michael@0 | 31 | -moz-box-align: center; |
michael@0 | 32 | margin: 2px; |
michael@0 | 33 | border-right: 2px solid transparent; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | .checkbox-label-center-box { |
michael@0 | 37 | -moz-box-align: center; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | .checkbox-label-box { |
michael@0 | 41 | -moz-appearance: checkbox-label; |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | .checkbox-icon[src] { |
michael@0 | 45 | -moz-margin-end: 2px; |
michael@0 | 46 | } |
michael@0 | 47 | |
michael@0 | 48 | .checkbox-label { |
michael@0 | 49 | margin: 0 !important; |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | /* ..... focused state ..... */ |
michael@0 | 53 | |
michael@0 | 54 | checkbox:focus > .checkbox-label-center-box > .checkbox-label-box { |
michael@0 | 55 | border: 1px dotted ThreeDDarkShadow; |
michael@0 | 56 | } |
michael@0 | 57 | |
michael@0 | 58 | /* ..... disabled state ..... */ |
michael@0 | 59 | |
michael@0 | 60 | checkbox[disabled="true"] > .checkbox-spacer-box > .checkbox-check { |
michael@0 | 61 | background-color: -moz-Dialog; |
michael@0 | 62 | } |
michael@0 | 63 | |
michael@0 | 64 | checkbox[disabled="true"] { |
michael@0 | 65 | color: GrayText; |
michael@0 | 66 | } |
michael@0 | 67 | |
michael@0 | 68 | /* ::::: checkmark image ::::: */ |
michael@0 | 69 | |
michael@0 | 70 | .checkbox-check { |
michael@0 | 71 | border: 2px solid; |
michael@0 | 72 | -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow; |
michael@0 | 73 | -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow; |
michael@0 | 74 | -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow; |
michael@0 | 75 | -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; |
michael@0 | 76 | min-width: 13px; |
michael@0 | 77 | min-height: 13px; |
michael@0 | 78 | background: -moz-Field no-repeat 50% 50%; |
michael@0 | 79 | } |
michael@0 | 80 | |
michael@0 | 81 | checkbox:not([disabled="true"]):hover { |
michael@0 | 82 | color: -moz-buttonhovertext; |
michael@0 | 83 | text-shadow: none; |
michael@0 | 84 | } |
michael@0 | 85 | |
michael@0 | 86 | checkbox:hover:active > .checkbox-spacer-box > .checkbox-check { |
michael@0 | 87 | background-color: -moz-Dialog; |
michael@0 | 88 | } |
michael@0 | 89 | |
michael@0 | 90 | /* ..... checked state ..... */ |
michael@0 | 91 | |
michael@0 | 92 | checkbox[checked="true"] > .checkbox-spacer-box > .checkbox-check { |
michael@0 | 93 | background-image: url("chrome://global/skin/checkbox/cbox-check.gif"); |
michael@0 | 94 | } |
michael@0 | 95 | |
michael@0 | 96 | checkbox[checked="true"][disabled="true"] > .checkbox-spacer-box > .checkbox-check { |
michael@0 | 97 | background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif") !important |
michael@0 | 98 | } |
michael@0 | 99 |