Bug 1520661 - Stop using XUL grid layout in update binding. r=paolo
authorTim Nguyen <ntim.bugs@gmail.com>
Fri, 18 Jan 2019 11:49:33 +0000
changeset 454434 4898d60f2d0959882b94cb1a45a5810e0e922abb
parent 454433 cb526a4489cb07a2516dd27646b99446e1ed3aea
child 454435 e68122d622790571d4846452cb70c8565f126f85
push id35397
push useropoprus@mozilla.com
push dateSat, 19 Jan 2019 03:35:41 +0000
treeherdermozilla-central@57dc8bbbc38f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaolo
bugs1520661
milestone66.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 1520661 - Stop using XUL grid layout in update binding. r=paolo Differential Revision: https://phabricator.services.mozilla.com/D16763
toolkit/mozapps/update/content/updates.xml
toolkit/themes/linux/mozapps/update/updates.css
toolkit/themes/osx/mozapps/update/updates.css
toolkit/themes/windows/mozapps/update/updates.css
--- a/toolkit/mozapps/update/content/updates.xml
+++ b/toolkit/mozapps/update/content/updates.xml
@@ -25,52 +25,48 @@
 
   <binding id="update" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
     <content>
       <xul:hbox>
         <xul:label class="update-name" xbl:inherits="value=name" flex="1" crop="right"/>
         <xul:label xbl:inherits="href=detailsURL,hidden=hideDetailsURL" class="text-link"
                    value="&update.details.label;"/>
       </xul:hbox>
-      <xul:grid>
-        <xul:columns>
-          <xul:column class="update-label-column"/>
-          <xul:column flex="1"/>
-        </xul:columns>
-        <xul:rows>
-          <xul:row>
-            <xul:label class="update-installedOn-label">&update.installedOn.label;</xul:label>
-            <xul:label class="update-installedOn-value" xbl:inherits="value=installDate" flex="1" crop="right"/>
-          </xul:row>
-          <xul:row>
-            <xul:label class="update-status-label">&update.status.label;</xul:label>
-            <xul:description class="update-status-value" flex="1"/>
-          </xul:row>
-        </xul:rows>
-      </xul:grid>
+      <xul:hbox>
+        <xul:label class="update-installedOn-label">&update.installedOn.label;</xul:label>
+        <xul:label class="update-installedOn-value" flex="1"/>
+      </xul:hbox>
+      <xul:hbox>
+        <xul:label class="update-status-label">&update.status.label;</xul:label>
+        <xul:description class="update-status-value" flex="1"/>
+      </xul:hbox>
     </content>
     <implementation>
       <property name="name"
                 onget="return this.getAttribute('name');"
                 onset="this.setAttribute('name', val); return val;"/>
       <property name="detailsURL"
                 onget="return this.getAttribute('detailsURL');"
                 onset="this.setAttribute('detailsURL', val); return val;"/>
       <property name="installDate"
-                onget="return this.getAttribute('installDate');"
-                onset="this.setAttribute('installDate', val); return val;"/>
+                onget="return this.getAttribute('installDate');">
+        <setter><![CDATA[
+          this.setAttribute("installDate", val);
+          var field = document.getAnonymousElementByAttribute(this, "class", "update-installedOn-value");
+          field.textContent = val;
+          return val;
+        ]]></setter>
+      </property>
       <property name="hideDetailsURL"
                 onget="return this.getAttribute('hideDetailsURL');"
                 onset="this.setAttribute('hideDetailsURL', val); return val;"/>
       <property name="status"
                 onget="return this.getAttribute('status');">
         <setter><![CDATA[
           this.setAttribute("status", val);
           var field = document.getAnonymousElementByAttribute(this, "class", "update-status-value");
-          while (field.hasChildNodes())
-            field.firstChild.remove();
-          field.appendChild(document.createTextNode(val));
+          field.textContent = val;
           return val;
         ]]></setter>
       </property>
     </implementation>
   </binding>
 </bindings>
--- a/toolkit/themes/linux/mozapps/update/updates.css
+++ b/toolkit/themes/linux/mozapps/update/updates.css
@@ -114,13 +114,22 @@ update {
   -moz-box-align: end;
 }
 
 .update-type {
   font-weight: bold;
   color: #990000;
 }
 
+.update-status-value,
+.update-installedOn-value {
+  margin-inline-start: 1ch;
+}
+
 #historyItems {
   -moz-appearance: listbox;
   height: 200px;
   margin: 1px 5px 5px 5px;
 }
+
+#historyItems .update {
+  padding: 5px;
+}
--- a/toolkit/themes/osx/mozapps/update/updates.css
+++ b/toolkit/themes/osx/mozapps/update/updates.css
@@ -157,13 +157,22 @@ update {
   -moz-box-align: end;
 }
 
 .update-type {
   font-weight: bold;
   color: #990000;
 }
 
+.update-status-value,
+.update-installedOn-value {
+  margin-inline-start: 1ch;
+}
+
 #historyItems {
   -moz-appearance: listbox;
   height: 200px;
   margin: 1px 5px 5px 5px;
 }
+
+#historyItems .update {
+  padding: 5px;
+}
--- a/toolkit/themes/windows/mozapps/update/updates.css
+++ b/toolkit/themes/windows/mozapps/update/updates.css
@@ -133,14 +133,23 @@ update {
   -moz-box-align: end;
 }
 
 .update-type {
   font-weight: bold;
   color: #990000;
 }
 
+.update-status-value,
+.update-installedOn-value {
+  margin-inline-start: 1ch;
+}
+
 #historyItems {
   -moz-appearance: listbox;
   height: 200px;
   margin: 1px 5px 5px 5px;
   margin-bottom: 1px;
 }
+
+#historyItems .update {
+  padding: 5px;
+}