Bug 1344630 - Display parsed primary and secondary value in profile item. r=seanlee
MozReview-Commit-ID: 2XJMS4fGzyg
--- a/browser/extensions/formautofill/content/formautofill.xml
+++ b/browser/extensions/formautofill/content/formautofill.xml
@@ -58,21 +58,20 @@
<method name="_onUnderflow">
<body></body>
</method>
<method name="_adjustAcItem">
<body>
<![CDATA[
let outerBoxRect = this.parentNode.getBoundingClientRect();
- let value = this.getAttribute("ac-value");
- let comment = this.getAttribute("ac-comment");
+ let {primary, secondary} = JSON.parse(this.getAttribute("ac-value"));
- this._comment.textContent = comment;
- this._label.textContent = value;
+ this._label.textContent = primary;
+ this._comment.textContent = secondary;
// Make item fit in popup as XUL box could not constrain
// item's width
this._itemBox.style.width = outerBoxRect.width + "px";
// Use two-lines layout when width is smaller than 150px
if (outerBoxRect.width <= 150) {
this._itemBox.setAttribute("size", "small");
} else {