Bug 1507829 - Use html:progress in the Add-ons Manager. r=aswan
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Fri, 16 Nov 2018 16:04:45 +0000
changeset 503836 72521d6e680f7a0b0771d56867393ec1cadd5989
parent 503835 0fbfcab038431951b9c53b5ee669d01d7b336d03
child 503837 0f64862fa1c318d5efd7005a4fb45854351023c7
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1507829
milestone65.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 1507829 - Use html:progress in the Add-ons Manager. r=aswan Differential Revision: https://phabricator.services.mozilla.com/D12143
toolkit/mozapps/extensions/content/extensions.xml
toolkit/themes/shared/extensions/extensions.inc.css
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -9,17 +9,18 @@
 %extensionsDTD;
 ]>
 
 <!-- import-globals-from extensions.js -->
 
 <bindings id="addonBindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-          xmlns:xbl="http://www.mozilla.org/xbl">
+          xmlns:xbl="http://www.mozilla.org/xbl"
+          xmlns:html="http://www.w3.org/1999/xhtml">
 
 
   <!-- Rating - displays current/average rating, allows setting user rating -->
   <binding id="rating">
     <content>
       <xul:image class="star"
                  onmouseover="document.getBindingParent(this)._hover(1);"
                  onclick="document.getBindingParent(this).userRating = 1;"/>
@@ -124,18 +125,17 @@
 
   <!-- Download progress - shows graphical progress of download and any
        related status message. -->
   <binding id="download-progress">
     <content>
       <xul:stack flex="1">
         <xul:hbox flex="1">
           <xul:hbox class="start-cap"/>
-          <xul:progressmeter anonid="progress" class="progress" flex="1"
-                             min="0" max="100"/>
+          <html:progress anonid="progress" class="progress" max="100"/>
           <xul:hbox class="end-cap"/>
         </xul:hbox>
         <xul:hbox class="status-container">
           <xul:spacer flex="1"/>
           <xul:label anonid="status" class="status"/>
           <xul:spacer flex="1"/>
           <xul:button anonid="cancel-btn" class="cancel"
                       tooltiptext="&progress.cancel.tooltip;"
@@ -158,40 +158,37 @@
       <field name="_cancel">
         document.getAnonymousElementByAttribute(this, "anonid", "cancel-btn");
       </field>
       <field name="_status">
         document.getAnonymousElementByAttribute(this, "anonid", "status");
       </field>
 
       <property name="progress">
-        <getter><![CDATA[
-          return this._progress.value;
-        ]]></getter>
         <setter><![CDATA[
-          this._progress.value = val;
+          // This property is always updated after maxProgress.
+          if (this.getAttribute("mode") == "determined") {
+            this._progress.value = val;
+          }
           if (val == this._progress.max)
             this.setAttribute("complete", true);
           else
             this.removeAttribute("complete");
         ]]></setter>
       </property>
 
       <property name="maxProgress">
-        <getter><![CDATA[
-          return this._progress.max;
-        ]]></getter>
         <setter><![CDATA[
           if (val == -1) {
-            this._progress.mode = "undetermined";
+            this.setAttribute("mode", "undetermined");
+            this._progress.removeAttribute("value");
           } else {
-            this._progress.mode = "determined";
-            this._progress.max = val;
+            this.setAttribute("mode", "determined");
+            this._progress.setAttribute("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/shared/extensions/extensions.inc.css
+++ b/toolkit/themes/shared/extensions/extensions.inc.css
@@ -829,16 +829,17 @@ button.warning {
   background-color: var(--in-content-border-highlight);
 }
 
 .download-progress .progress .progress-bar  {
   min-height: 28px;
 }
 
 .download-progress .progress {
+  -moz-box-flex: 1;
   -moz-appearance: none;
   background-color: transparent;
   padding: 0;
   margin: 0;
   border: none;
 }
 
 .download-progress .start-cap,