michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * The downloads richlistbox may list thousands of items, and it turns out michael@0: * XBL binding attachment, and even more so detachment, is a performance hog. michael@0: * This hack makes sure we don't apply any binding to inactive items (inactive michael@0: * items are history downloads that haven't been in the visible area). michael@0: * We can do this because the richlistbox implementation does not interact michael@0: * much with the richlistitem binding. However, this may turn out to have michael@0: * some side effects (see bug 828111 for the details). michael@0: * michael@0: * We might be able to do away with this workaround once bug 653881 is fixed. michael@0: */ michael@0: richlistitem.download { michael@0: -moz-binding: none; michael@0: } michael@0: michael@0: richlistitem.download[active] { michael@0: -moz-binding: url('chrome://browser/content/downloads/download.xml#download-full-ui'); michael@0: } michael@0: michael@0: .download-state:not( [state="0"] /* Downloading */) michael@0: .downloadPauseMenuItem, michael@0: .download-state:not( [state="4"] /* Paused */) michael@0: .downloadResumeMenuItem, michael@0: .download-state:not(:-moz-any([state="2"], /* Failed */ michael@0: [state="4"]) /* Paused */) michael@0: .downloadCancelMenuItem, michael@0: .download-state[state]:not(:-moz-any([state="1"], /* Finished */ michael@0: [state="2"], /* Failed */ michael@0: [state="3"], /* Canceled */ michael@0: [state="6"], /* Blocked (parental) */ michael@0: [state="8"], /* Blocked (dirty) */ michael@0: [state="9"]) /* Blocked (policy) */) michael@0: .downloadRemoveFromHistoryMenuItem, michael@0: .download-state:not(:-moz-any([state="-1"],/* Starting (initial) */ michael@0: [state="0"], /* Downloading */ michael@0: [state="1"], /* Finished */ michael@0: [state="4"], /* Paused */ michael@0: [state="5"]) /* Starting (queued) */) michael@0: .downloadShowMenuItem, michael@0: .download-state[state="7"] .downloadCommandsSeparator michael@0: { michael@0: display: none; michael@0: }