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. draft
authorEvan Tseng <evan@tseng.io>
Fri, 08 Dec 2017 18:39:16 +0800
changeset 709621 8913bc8937a9adf63f4809e564d07c726876dfc4
parent 709416 457b0fe91e0d49a5bc35014fb6f86729cd5bac9b
child 743466 6b1cea352d64305d608de29710cb0f3e4434ae5d
push id92698
push userbmo:evan@tseng.io
push dateFri, 08 Dec 2017 10:39:58 +0000
bugs1420884
milestone59.0a1
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
browser/extensions/formautofill/FormAutofillPreferences.jsm
--- 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