browser/components/downloads/content/allDownloadsViewOverlay.css

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/downloads/content/allDownloadsViewOverlay.css	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +/**
     1.9 + * The downloads richlistbox may list thousands of items, and it turns out
    1.10 + * XBL binding attachment, and even more so detachment, is a performance hog.
    1.11 + * This hack makes sure we don't apply any binding to inactive items (inactive
    1.12 + * items are history downloads that haven't been in the visible area).
    1.13 + * We can do this because the richlistbox implementation does not interact
    1.14 + * much with the richlistitem binding.  However, this may turn out to have
    1.15 + * some side effects (see bug 828111 for the details).
    1.16 + *
    1.17 + * We might be able to do away with this workaround once bug 653881 is fixed.
    1.18 + */
    1.19 +richlistitem.download {
    1.20 +  -moz-binding: none;
    1.21 +}
    1.22 +
    1.23 +richlistitem.download[active] {
    1.24 +  -moz-binding: url('chrome://browser/content/downloads/download.xml#download-full-ui');
    1.25 +}
    1.26 +
    1.27 +.download-state:not(          [state="0"]  /* Downloading        */)
    1.28 +                                           .downloadPauseMenuItem,
    1.29 +.download-state:not(          [state="4"]  /* Paused             */)
    1.30 +                                           .downloadResumeMenuItem,
    1.31 +.download-state:not(:-moz-any([state="2"], /* Failed             */
    1.32 +                              [state="4"]) /* Paused             */)
    1.33 +                                           .downloadCancelMenuItem,
    1.34 +.download-state[state]:not(:-moz-any([state="1"], /* Finished           */
    1.35 +                                     [state="2"], /* Failed             */
    1.36 +                                     [state="3"], /* Canceled           */
    1.37 +                                     [state="6"], /* Blocked (parental) */
    1.38 +                                     [state="8"], /* Blocked (dirty)    */
    1.39 +                                     [state="9"]) /* Blocked (policy)   */)
    1.40 +                                           .downloadRemoveFromHistoryMenuItem,
    1.41 +.download-state:not(:-moz-any([state="-1"],/* Starting (initial) */
    1.42 +                              [state="0"], /* Downloading        */
    1.43 +                              [state="1"], /* Finished           */
    1.44 +                              [state="4"], /* Paused             */
    1.45 +                              [state="5"]) /* Starting (queued)  */)
    1.46 +                                           .downloadShowMenuItem,
    1.47 +.download-state[state="7"]                 .downloadCommandsSeparator
    1.48 +{
    1.49 +  display: none;
    1.50 +}

mercurial