Bug 1420884 - Make savedAddressesBtnWrapper and savedCreditCardsBtnWrapper align start to keep the buttons as same size when the sibling description elements' height is changed by longer l10n strings.
MozReview-Commit-ID: ATMwMdUGfmE
--- a/browser/extensions/formautofill/FormAutofillPreferences.jsm
+++ b/browser/extensions/formautofill/FormAutofillPreferences.jsm
@@ -86,16 +86,19 @@ FormAutofillPreferences.prototype = {
formAutofillGroup.id = "formAutofillGroup";
addressAutofill.id = "addressAutofill";
addressAutofillLearnMore.id = "addressAutofillLearnMore";
addressAutofill.setAttribute("data-subcategory", "address-autofill");
addressAutofillLearnMore.setAttribute("value", this.bundle.GetStringFromName("learnMoreLabel"));
addressAutofillCheckbox.setAttribute("label", this.bundle.GetStringFromName("autofillAddressesCheckbox"));
savedAddressesBtn.setAttribute("label", this.bundle.GetStringFromName("savedAddressesBtnLabel"));
+ // Align the start to keep the savedAddressesBtn as original size
+ // when addressAutofillCheckboxGroup's height is changed by a longer l10n string
+ savedAddressesBtnWrapper.setAttribute("align", "start");
addressAutofillLearnMore.setAttribute("href", learnMoreURL);
// Add preferences search support
savedAddressesBtn.setAttribute("searchkeywords", MANAGE_ADDRESSES_KEYWORDS.concat(EDIT_ADDRESS_KEYWORDS)
.map(key => this.bundle.GetStringFromName(key)).join("\n"));
// Manually set the checked state
@@ -130,16 +133,19 @@ FormAutofillPreferences.prototype = {
creditCardAutofill.id = "creditCardAutofill";
creditCardAutofillLearnMore.id = "creditCardAutofillLearnMore";
creditCardAutofill.setAttribute("data-subcategory", "credit-card-autofill");
creditCardAutofillLearnMore.setAttribute("value", this.bundle.GetStringFromName("learnMoreLabel"));
creditCardAutofillCheckbox.setAttribute("label", this.bundle.GetStringFromName("autofillCreditCardsCheckbox"));
savedCreditCardsBtn.setAttribute("label", this.bundle.GetStringFromName("savedCreditCardsBtnLabel"));
+ // Align the start to keep the savedCreditCardsBtn as original size
+ // when creditCardAutofillCheckboxGroup's height is changed by a longer l10n string
+ savedCreditCardsBtnWrapper.setAttribute("align", "start");
creditCardAutofillLearnMore.setAttribute("href", learnMoreURL);
// Add preferences search support
savedCreditCardsBtn.setAttribute("searchkeywords", MANAGE_CREDITCARDS_KEYWORDS.concat(EDIT_CREDITCARD_KEYWORDS)
.map(key => this.bundle.GetStringFromName(key)).join("\n"));
// Manually set the checked state