Bug 616641 - Start/end caps of the download-progress binding broken on Windows/OSX with undetermined mode. r=dtownsend, a=blocking-final
authorBlair McBride <bmcbride@mozilla.com>
Tue, 07 Dec 2010 13:28:49 +1300
changeset 58729 63fc6076169bace0e7c654bfac71a9d258feb37a
parent 58728 686e646d23004d082909149f04b4aa0cd35b9200
child 58730 ee65aa15982e1af2b6a48fcf93ecf5c2e111e5e7
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdtownsend, blocking-final
bugs616641
milestone2.0b8pre
Bug 616641 - Start/end caps of the download-progress binding broken on Windows/OSX with undetermined mode. r=dtownsend, a=blocking-final
toolkit/mozapps/extensions/content/extensions.css
toolkit/mozapps/extensions/content/extensions.xml
toolkit/themes/pinstripe/mozapps/extensions/extensions.css
toolkit/themes/winstripe/mozapps/extensions/extensions.css
--- a/toolkit/mozapps/extensions/content/extensions.css
+++ b/toolkit/mozapps/extensions/content/extensions.css
@@ -70,17 +70,17 @@ xhtml|link {
 .creator {
   -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#creator-link");
 }
 
 .meta-rating {
   -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#rating");
 }
 
-.download-progress {
+.download-progress, .download-progress[mode="undetermined"] {
   -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#download-progress");
 }
 
 .install-status {
   -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#install-status");
 }
 
 .detail-row {
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -213,20 +213,21 @@
 
       <property name="maxProgress">
         <getter><![CDATA[
           return this._progress.max;
         ]]></getter>
         <setter><![CDATA[
           if (val == -1) {
             this._progress.mode = "undetermined";
-            return;
+          } else {
+            this._progress.mode = "determined";
+            this._progress.max = val;
           }
-          this._progress.mode = "determined";
-          this._progress.max = val;
+          this.setAttribute("mode", this._progress.mode);
         ]]></setter>
       </property>
 
       <property name="status">
         <getter><![CDATA[
           return this._status.value;
         ]]></getter>
         <setter><![CDATA[
--- a/toolkit/themes/pinstripe/mozapps/extensions/extensions.css
+++ b/toolkit/themes/pinstripe/mozapps/extensions/extensions.css
@@ -832,20 +832,31 @@
   border: 1px solid #858898;
   border-radius: 3px;
   box-shadow: inset #E3E8EC 0 1px 1px, rgba(227, 232, 236, 0.4) 0 1px 1px;
   width: 200px;
   height: 21px;
   margin: 0 8px;
 }
 
+.download-progress[mode="undetermined"] .progress {
+  -moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter-undetermined");
+}
 
+.download-progress[mode="undetermined"] {
+  border-color: #2E773A;
+}
+
+.download-progress[mode="undetermined"] .status-container {
+  padding: 0 2px;
+}
 
 .download-progress .start-cap,
 .download-progress[complete] .end-cap,
+.download-progress[mode="undetermined"] .end-cap,
 .download-progress .progress .progress-bar {
   -moz-appearance: none;
   background-image: -moz-linear-gradient(#6AC47E, #4FAC6A);
   margin-top: -1px;
   margin-bottom: -1px;
   border: 1px solid #2E773A;
 }
 
@@ -857,16 +868,17 @@
 .download-progress .end-cap {
   -moz-margin-end: -1px;
   -moz-border-start-width: 0px !important;
 }
 
 .download-progress .progress .progress-bar  {
   border-left-width: 0;
   border-right-width: 0;
+  min-height: 21px;
 }
 
 .download-progress .progress {
   -moz-appearance: none;
   background-color: transparent;
   padding: 0;
   margin: 0;
   border: none;
--- a/toolkit/themes/winstripe/mozapps/extensions/extensions.css
+++ b/toolkit/themes/winstripe/mozapps/extensions/extensions.css
@@ -905,20 +905,27 @@
   border-color: rgba(0, 0, 0, 0.12) rgba(0, 0, 0, 0.19) rgba(0, 0, 0, 0.38);
   box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset,
               0 0 0 2px rgba(255, 255, 255, 0.1) inset;
   width: 200px;
   height: 21px;
   margin: 0 8px;
 }
 
+.download-progress[mode="undetermined"] {
+  border-color: #358942 #317F3D #2E773A;
+}
 
+.download-progress[mode="undetermined"] .status-container {
+  padding: 0 2px;
+}
 
 .download-progress .start-cap,
 .download-progress[complete] .end-cap,
+.download-progress[mode="undetermined"] .end-cap,
 .download-progress .progress .progress-bar {
   -moz-appearance: none;
   background-image: -moz-linear-gradient(#71CA83, #54B06C 49%, #43A05D 51%, #60BB76);
   margin-top: -1px;
   margin-bottom: -1px;
   border: 1px solid;
   border-color: #358942 #317F3D #2E773A;
 }
@@ -931,16 +938,17 @@
 .download-progress .end-cap {
   -moz-margin-end: -1px;
   -moz-border-start-width: 0px !important;
 }
 
 .download-progress .progress .progress-bar  {
   border-left-width: 0;
   border-right-width: 0;
+  min-height: 21px;
 }
 
 .download-progress .progress {
   -moz-appearance: none;
   background-color: transparent;
   padding: 0;
   margin: 0;
   border: none;