Bug 822343 (Part 3) - Avoid some costs in downloads view appendChild.
authorMarco Bonardo <mbonardo@mozilla.com>
Fri, 21 Dec 2012 15:19:21 +0100
changeset 125873 9810612fbb641d8fc6095df082b85f93ce361032
parent 125872 c5a0052af398fe56db74c2b4b07dac740216e4ae
child 125874 133dc155974b9c8d67fe1298b5e0dda5a0b27c63
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs822343
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 822343 (Part 3) - Avoid some costs in downloads view appendChild. r=Mano
browser/components/downloads/content/download.css
browser/components/downloads/content/download.xml
browser/themes/gnomestripe/downloads/allDownloadsViewOverlay.css
browser/themes/winstripe/downloads/allDownloadsViewOverlay.css
--- a/browser/components/downloads/content/download.css
+++ b/browser/components/downloads/content/download.css
@@ -36,10 +36,10 @@ richlistitem.download button {
 
 .download-state:not(:-moz-any([state="2"], /* Failed             */
                               [state="3"]) /* Canceled           */)
                                            .downloadRetry,
 
 .download-state:not(          [state="1"]  /* Finished           */)
                                            .downloadShow
 {
-  visibility: hidden;
+  display: none;
 }
--- a/browser/components/downloads/content/download.xml
+++ b/browser/components/downloads/content/download.xml
@@ -79,22 +79,22 @@
                            min="0"
                            max="100"
                            xbl:inherits="mode=progressmode,value=progress"/>
         <xul:description class="downloadDetails"
                          style="width: &downloadDetails.width;"
                          crop="end"
                          xbl:inherits="value=status,tooltiptext=statusTip"/>
       </xul:vbox>
-      <xul:stack>
-        <xul:button class="downloadButton downloadCancel"
-                    command="downloadsCmd_cancel"
-                    tooltiptext="&cmd.cancel.label;"/>
-        <xul:button class="downloadButton downloadRetry"
-                    command="downloadsCmd_retry"
-                    tooltiptext="&cmd.retry.label;"/>
-        <xul:button class="downloadButton downloadShow"
-                    command="downloadsCmd_show"
-                    tooltiptext="&cmd.show.label;"/>
-      </xul:stack>
+
+      <xul:button class="downloadButton downloadCancel"
+                  oncommand="goDoCommand('downloadsCmd_cancel')"
+                  tooltiptext="&cmd.cancel.label;"/>
+      <xul:button class="downloadButton downloadRetry"
+                  oncommand="goDoCommand('downloadsCmd_retry')"
+                  tooltiptext="&cmd.retry.label;"/>
+      <xul:button class="downloadButton downloadShow"
+                  oncommand="goDoCommand('downloadsCmd_show')"
+                  tooltiptext="&cmd.show.label;"/>
+
     </content>
   </binding>
 </bindings>
--- a/browser/themes/gnomestripe/downloads/allDownloadsViewOverlay.css
+++ b/browser/themes/gnomestripe/downloads/allDownloadsViewOverlay.css
@@ -168,23 +168,23 @@ richlistitem[type="download"][state="1"]
 }
 .downloadButton.downloadRetry:hover {
   -moz-image-region: rect(32px, 32px, 48px, 16px);
 }
 .downloadButton.downloadRetry:active {
   -moz-image-region: rect(32px, 48px, 48px, 32px);
 }
 
-richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow {
+richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow {
   -moz-image-region: rect(48px, 16px, 64px, 0px);
 }
-richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:hover {
+richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:hover {
   -moz-image-region: rect(48px, 32px, 64px, 16px);
 }
-richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:active {
+richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:active {
   -moz-image-region: rect(48px, 48px, 64px, 32px);
 }
 
 /*** Status and progress indicator ***/
 
 #downloads-indicator-anchor {
   /* Makes the outermost stack element positioned, so that its contents are
      rendered over the main browser window in the Z order.  This is required by
--- a/browser/themes/winstripe/downloads/allDownloadsViewOverlay.css
+++ b/browser/themes/winstripe/downloads/allDownloadsViewOverlay.css
@@ -173,23 +173,23 @@ richlistitem[type="download"][state="1"]
 .downloadButton.downloadRetry:active {
   -moz-image-region: rect(32px, 48px, 48px, 32px);
 }
 
 %ifdef WINSTRIPE_AERO
 @media not all and (-moz-windows-default-theme) {
 %endif
 
-richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow {
+richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow {
   -moz-image-region: rect(48px, 16px, 64px, 0px);
 }
-richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:hover {
+richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:hover {
   -moz-image-region: rect(48px, 32px, 64px, 16px);
 }
-richlistitem[type="download"][state="1"]:hover > stack > .downloadButton.downloadShow:active {
+richlistitem[type="download"][state="1"]:hover > .downloadButton.downloadShow:active {
   -moz-image-region: rect(48px, 48px, 64px, 32px);
 }
 
 %ifdef WINSTRIPE_AERO
 }
 %endif
 
 /*** Status and progress indicator ***/