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 | /* ===== button.css ===================================================== |
michael@0 | 6 | == Styles used by the XUL button 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 | /* :::::::::: button :::::::::: */ |
michael@0 | 12 | |
michael@0 | 13 | button { |
michael@0 | 14 | -moz-appearance: button; |
michael@0 | 15 | margin: 1px 5px 2px 5px; |
michael@0 | 16 | min-width: 6.3em; |
michael@0 | 17 | border: 3px solid; |
michael@0 | 18 | -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow; |
michael@0 | 19 | -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow; |
michael@0 | 20 | -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow; |
michael@0 | 21 | -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow; |
michael@0 | 22 | background-color: ThreeDFace; |
michael@0 | 23 | color: ButtonText; |
michael@0 | 24 | text-shadow: none; |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | .button-box { |
michael@0 | 28 | -moz-appearance: button-focus; |
michael@0 | 29 | border: 1px solid transparent; |
michael@0 | 30 | padding-top: 1px; |
michael@0 | 31 | padding-bottom: 2px; |
michael@0 | 32 | -moz-padding-start: 3px; |
michael@0 | 33 | -moz-padding-end: 4px; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | .button-icon { |
michael@0 | 37 | -moz-margin-end: 2px; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | .button-text { |
michael@0 | 41 | margin: 0 !important; |
michael@0 | 42 | text-align: center; |
michael@0 | 43 | } |
michael@0 | 44 | |
michael@0 | 45 | /* .......... focused state .......... */ |
michael@0 | 46 | |
michael@0 | 47 | button:focus { |
michael@0 | 48 | -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight transparent; |
michael@0 | 49 | -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 50 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 51 | -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight transparent; |
michael@0 | 52 | } |
michael@0 | 53 | |
michael@0 | 54 | button:focus > .button-box { |
michael@0 | 55 | border: 1px dotted ThreeDDarkShadow; |
michael@0 | 56 | } |
michael@0 | 57 | |
michael@0 | 58 | /* .......... default state .......... */ |
michael@0 | 59 | |
michael@0 | 60 | button[default="true"] { |
michael@0 | 61 | -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow; |
michael@0 | 62 | -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 63 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 64 | -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow; |
michael@0 | 65 | } |
michael@0 | 66 | |
michael@0 | 67 | /* .......... hover state .......... */ |
michael@0 | 68 | |
michael@0 | 69 | button:hover { |
michael@0 | 70 | color: -moz-buttonhovertext; |
michael@0 | 71 | background-color: -moz-buttonhoverface; |
michael@0 | 72 | } |
michael@0 | 73 | |
michael@0 | 74 | /* .......... active/open/checked state .......... */ |
michael@0 | 75 | |
michael@0 | 76 | button:hover:active, |
michael@0 | 77 | button[open="true"], |
michael@0 | 78 | button[checked="true"] { |
michael@0 | 79 | -moz-border-top-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 80 | -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 81 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 82 | -moz-border-left-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 83 | color: ButtonText; |
michael@0 | 84 | } |
michael@0 | 85 | |
michael@0 | 86 | button:hover:active > .button-box, |
michael@0 | 87 | button[open="true"] > .button-box, |
michael@0 | 88 | button[checked="true"] > .button-box { |
michael@0 | 89 | padding-top: 2px; |
michael@0 | 90 | padding-bottom: 1px; |
michael@0 | 91 | -moz-padding-start: 4px; |
michael@0 | 92 | -moz-padding-end: 3px; |
michael@0 | 93 | } |
michael@0 | 94 | |
michael@0 | 95 | /* .......... disabled state .......... */ |
michael@0 | 96 | |
michael@0 | 97 | button[disabled="true"], |
michael@0 | 98 | button[disabled="true"]:hover:active { |
michael@0 | 99 | -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow !important; |
michael@0 | 100 | -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow !important; |
michael@0 | 101 | -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow !important; |
michael@0 | 102 | -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow !important; |
michael@0 | 103 | color: GrayText; |
michael@0 | 104 | } |
michael@0 | 105 | |
michael@0 | 106 | button[disabled="true"] > .button-box { |
michael@0 | 107 | padding-top: 1px !important; |
michael@0 | 108 | padding-bottom: 2px !important; |
michael@0 | 109 | -moz-padding-start: 3px !important; |
michael@0 | 110 | -moz-padding-end: 4px !important; |
michael@0 | 111 | } |
michael@0 | 112 | |
michael@0 | 113 | /* ::::: menu/menu-button buttons ::::: */ |
michael@0 | 114 | |
michael@0 | 115 | button[type="menu-button"] { |
michael@0 | 116 | -moz-appearance: dualbutton; |
michael@0 | 117 | } |
michael@0 | 118 | |
michael@0 | 119 | .button-menubutton-button { |
michael@0 | 120 | margin: 0; |
michael@0 | 121 | } |
michael@0 | 122 | |
michael@0 | 123 | .button-menu-dropmarker, |
michael@0 | 124 | .button-menubutton-dropmarker { |
michael@0 | 125 | -moz-appearance: toolbarbutton-dropdown !important; |
michael@0 | 126 | } |
michael@0 | 127 | |
michael@0 | 128 | .button-menubutton-dropmarker { |
michael@0 | 129 | -moz-margin-end: 3px; |
michael@0 | 130 | } |
michael@0 | 131 | |
michael@0 | 132 | /* ::::: plain buttons ::::: */ |
michael@0 | 133 | |
michael@0 | 134 | button.plain { |
michael@0 | 135 | border: 0px !important; |
michael@0 | 136 | margin: 0px !important; |
michael@0 | 137 | padding: 0px !important; |
michael@0 | 138 | } |
michael@0 | 139 | |
michael@0 | 140 | button[type="disclosure"] { |
michael@0 | 141 | border: 0px !important; |
michael@0 | 142 | margin: 0px !important; |
michael@0 | 143 | padding: 0px !important; |
michael@0 | 144 | -moz-appearance: none; |
michael@0 | 145 | list-style-image: url("chrome://global/skin/tree/twisty-clsd.png"); |
michael@0 | 146 | min-width: 0px !important; |
michael@0 | 147 | background-color: transparent; |
michael@0 | 148 | } |
michael@0 | 149 | |
michael@0 | 150 | button[type="disclosure"][open="true"] { |
michael@0 | 151 | list-style-image: url("chrome://global/skin/tree/twisty-open.png"); |
michael@0 | 152 | } |
michael@0 | 153 | |
michael@0 | 154 | /* |
michael@0 | 155 | * GNOME Stock Icon Styles |
michael@0 | 156 | */ |
michael@0 | 157 | |
michael@0 | 158 | button[icon="accept"] .button-icon { |
michael@0 | 159 | list-style-image: url("moz-icon://stock/gtk-ok?size=button"); |
michael@0 | 160 | } |
michael@0 | 161 | |
michael@0 | 162 | button[icon="accept"][disabled="true"] .button-icon { |
michael@0 | 163 | list-style-image: url("moz-icon://stock/gtk-ok?size=button&state=disabled"); |
michael@0 | 164 | } |
michael@0 | 165 | |
michael@0 | 166 | button[icon="cancel"] .button-icon { |
michael@0 | 167 | list-style-image: url("moz-icon://stock/gtk-cancel?size=button"); |
michael@0 | 168 | } |
michael@0 | 169 | |
michael@0 | 170 | button[icon="cancel"][disabled="true"] .button-icon { |
michael@0 | 171 | list-style-image: url("moz-icon://stock/gtk-cancel?size=button&state=disabled"); |
michael@0 | 172 | } |
michael@0 | 173 | |
michael@0 | 174 | button[icon="help"] .button-icon { |
michael@0 | 175 | list-style-image: url("moz-icon://stock/gtk-help?size=button"); |
michael@0 | 176 | } |
michael@0 | 177 | |
michael@0 | 178 | button[icon="help"][disabled="true"] .button-icon { |
michael@0 | 179 | list-style-image: url("moz-icon://stock/gtk-help?size=button&state=disabled"); |
michael@0 | 180 | } |
michael@0 | 181 | |
michael@0 | 182 | button[icon="open"] .button-icon { |
michael@0 | 183 | list-style-image: url("moz-icon://stock/gtk-open?size=button"); |
michael@0 | 184 | } |
michael@0 | 185 | |
michael@0 | 186 | button[icon="open"][disabled="true"] .button-icon { |
michael@0 | 187 | list-style-image: url("moz-icon://stock/gtk-open?size=button&state=disabled"); |
michael@0 | 188 | } |
michael@0 | 189 | |
michael@0 | 190 | button[icon="save"] .button-icon { |
michael@0 | 191 | list-style-image: url("moz-icon://stock/gtk-save?size=button"); |
michael@0 | 192 | } |
michael@0 | 193 | |
michael@0 | 194 | button[icon="save"][disabled="true"] .button-icon { |
michael@0 | 195 | list-style-image: url("moz-icon://stock/gtk-save?size=button&state=disabled"); |
michael@0 | 196 | } |
michael@0 | 197 | |
michael@0 | 198 | button[icon="find"] .button-icon { |
michael@0 | 199 | list-style-image: url("moz-icon://stock/gtk-find?size=button"); |
michael@0 | 200 | } |
michael@0 | 201 | |
michael@0 | 202 | button[icon="find"][disabled="true"] .button-icon { |
michael@0 | 203 | list-style-image: url("moz-icon://stock/gtk-find?size=button&state=disabled"); |
michael@0 | 204 | } |
michael@0 | 205 | |
michael@0 | 206 | button[icon="clear"] .button-icon { |
michael@0 | 207 | list-style-image: url("moz-icon://stock/gtk-clear?size=button"); |
michael@0 | 208 | } |
michael@0 | 209 | |
michael@0 | 210 | button[icon="clear"][disabled="true"] .button-icon { |
michael@0 | 211 | list-style-image: url("moz-icon://stock/gtk-clear?size=button&state=disabled"); |
michael@0 | 212 | } |
michael@0 | 213 | |
michael@0 | 214 | button[icon="yes"] .button-icon { |
michael@0 | 215 | list-style-image: url("moz-icon://stock/gtk-yes?size=button"); |
michael@0 | 216 | } |
michael@0 | 217 | |
michael@0 | 218 | button[icon="yes"][disabled="true"] .button-icon { |
michael@0 | 219 | list-style-image: url("moz-icon://stock/gtk-yes?size=button&state=disabled"); |
michael@0 | 220 | } |
michael@0 | 221 | |
michael@0 | 222 | button[icon="no"] .button-icon { |
michael@0 | 223 | list-style-image: url("moz-icon://stock/gtk-no?size=button"); |
michael@0 | 224 | } |
michael@0 | 225 | |
michael@0 | 226 | button[icon="no"][disabled="true"] .button-icon { |
michael@0 | 227 | list-style-image: url("moz-icon://stock/gtk-no?size=button&state=disabled"); |
michael@0 | 228 | } |
michael@0 | 229 | |
michael@0 | 230 | button[icon="apply"] .button-icon { |
michael@0 | 231 | list-style-image: url("moz-icon://stock/gtk-apply?size=button"); |
michael@0 | 232 | } |
michael@0 | 233 | |
michael@0 | 234 | button[icon="apply"][disabled="true"] .button-icon { |
michael@0 | 235 | list-style-image: url("moz-icon://stock/gtk-apply?size=button&state=disabled"); |
michael@0 | 236 | } |
michael@0 | 237 | |
michael@0 | 238 | button[icon="close"] .button-icon { |
michael@0 | 239 | list-style-image: url("moz-icon://stock/gtk-close?size=button"); |
michael@0 | 240 | } |
michael@0 | 241 | |
michael@0 | 242 | button[icon="close"][disabled="true"] .button-icon { |
michael@0 | 243 | list-style-image: url("moz-icon://stock/gtk-close?size=button&state=disabled"); |
michael@0 | 244 | } |
michael@0 | 245 | |
michael@0 | 246 | button[icon="print"] .button-icon { |
michael@0 | 247 | list-style-image: url("moz-icon://stock/gtk-print?size=button"); |
michael@0 | 248 | } |
michael@0 | 249 | |
michael@0 | 250 | button[icon="print"][disabled="true"] .button-icon { |
michael@0 | 251 | list-style-image: url("moz-icon://stock/gtk-print?size=button&state=disabled"); |
michael@0 | 252 | } |
michael@0 | 253 | |
michael@0 | 254 | button[icon="add"] .button-icon { |
michael@0 | 255 | list-style-image: url("moz-icon://stock/gtk-add?size=button"); |
michael@0 | 256 | } |
michael@0 | 257 | |
michael@0 | 258 | button[icon="add"][disabled="true"] .button-icon { |
michael@0 | 259 | list-style-image: url("moz-icon://stock/gtk-add?size=button&state=disabled"); |
michael@0 | 260 | } |
michael@0 | 261 | |
michael@0 | 262 | button[icon="remove"] .button-icon { |
michael@0 | 263 | list-style-image: url("moz-icon://stock/gtk-remove?size=button"); |
michael@0 | 264 | } |
michael@0 | 265 | |
michael@0 | 266 | button[icon="remove"][disabled="true"] .button-icon { |
michael@0 | 267 | list-style-image: url("moz-icon://stock/gtk-remove?size=button&state=disabled"); |
michael@0 | 268 | } |
michael@0 | 269 | |
michael@0 | 270 | button[icon="refresh"] .button-icon { |
michael@0 | 271 | list-style-image: url("moz-icon://stock/gtk-refresh?size=button"); |
michael@0 | 272 | } |
michael@0 | 273 | |
michael@0 | 274 | button[icon="refresh"][disabled="true"] .button-icon { |
michael@0 | 275 | list-style-image: url("moz-icon://stock/gtk-refresh?size=button&state=disabled"); |
michael@0 | 276 | } |
michael@0 | 277 | |
michael@0 | 278 | button[icon="revert"] .button-icon { |
michael@0 | 279 | list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=button"); |
michael@0 | 280 | } |
michael@0 | 281 | |
michael@0 | 282 | button[icon="revert"][disabled="true"] .button-icon { |
michael@0 | 283 | list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=button&state=disabled"); |
michael@0 | 284 | } |
michael@0 | 285 | |
michael@0 | 286 | button[icon="go-forward"] .button-icon { |
michael@0 | 287 | list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=button"); |
michael@0 | 288 | } |
michael@0 | 289 | |
michael@0 | 290 | button[icon="go-forward"][disabled="true"] .button-icon { |
michael@0 | 291 | list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=button&state=disabled"); |
michael@0 | 292 | } |
michael@0 | 293 | |
michael@0 | 294 | button[icon="go-forward"]:-moz-locale-dir(rtl) .button-icon { |
michael@0 | 295 | list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=button"); |
michael@0 | 296 | } |
michael@0 | 297 | |
michael@0 | 298 | button[icon="go-forward"]:-moz-locale-dir(rtl)[disabled="true"] .button-icon { |
michael@0 | 299 | list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=button&state=disabled"); |
michael@0 | 300 | } |
michael@0 | 301 | |
michael@0 | 302 | button[icon="go-back"] .button-icon { |
michael@0 | 303 | list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=button"); |
michael@0 | 304 | } |
michael@0 | 305 | |
michael@0 | 306 | button[icon="go-back"][disabled="true"] .button-icon { |
michael@0 | 307 | list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=button&state=disabled"); |
michael@0 | 308 | } |
michael@0 | 309 | |
michael@0 | 310 | button[icon="go-back"]:-moz-locale-dir(rtl) .button-icon { |
michael@0 | 311 | list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=button"); |
michael@0 | 312 | } |
michael@0 | 313 | |
michael@0 | 314 | button[icon="go-back"]:-moz-locale-dir(rtl)[disabled="true"] .button-icon { |
michael@0 | 315 | list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=button&state=disabled"); |
michael@0 | 316 | } |
michael@0 | 317 | |
michael@0 | 318 | button[icon="properties"] .button-icon { |
michael@0 | 319 | list-style-image: url("moz-icon://stock/gtk-properties?size=button"); |
michael@0 | 320 | } |
michael@0 | 321 | |
michael@0 | 322 | button[icon="properties"][disabled="true"] .button-icon { |
michael@0 | 323 | list-style-image: url("moz-icon://stock/gtk-properties?size=button&state=disabled"); |
michael@0 | 324 | } |
michael@0 | 325 | |
michael@0 | 326 | button[icon="select-font"] .button-icon { |
michael@0 | 327 | list-style-image: url("moz-icon://stock/gtk-select-font?size=button"); |
michael@0 | 328 | } |
michael@0 | 329 | |
michael@0 | 330 | button[icon="select-font"][disabled="true"] .button-icon { |
michael@0 | 331 | list-style-image: url("moz-icon://stock/gtk-select-font?size=button&state=disabled"); |
michael@0 | 332 | } |
michael@0 | 333 | |
michael@0 | 334 | button[icon="select-color"] .button-icon { |
michael@0 | 335 | list-style-image: url("moz-icon://stock/gtk-color-picker?size=button"); |
michael@0 | 336 | } |
michael@0 | 337 | |
michael@0 | 338 | button[icon="select-color"][disabled="true"] .button-icon { |
michael@0 | 339 | list-style-image: url("moz-icon://stock/gtk-color-picker?size=button&state=disabled"); |
michael@0 | 340 | } |
michael@0 | 341 | |
michael@0 | 342 | button[icon="network"] .button-icon { |
michael@0 | 343 | list-style-image: url("moz-icon://stock/gtk-network?size=button"); |
michael@0 | 344 | } |
michael@0 | 345 | |
michael@0 | 346 | button[icon="network"][disabled="true"] .button-icon { |
michael@0 | 347 | list-style-image: url("moz-icon://stock/gtk-network?size=button&state=disabled"); |
michael@0 | 348 | } |