From 2500902e96105a8ca748ff1ffb9c1e35232561a8 Mon Sep 17 00:00:00 2001 From: Doug Thayer Date: Tue, 10 Oct 2017 12:24:15 -0700 Subject: [PATCH] Bug 1403733 - Fix single button styling on Flash doorhanger r=Felipe There's not a great selector that covers the case of either button being hidden, so the best option seems to be an additional attribute. MozReview-Commit-ID: CMdjWQnPjGA --HG-- extra : rebase_source : ad6dbd1d9a85cbd70375013687330eb13135caa7 --- browser/base/content/urlbarBindings.xml | 6 ++++++ toolkit/themes/shared/popupnotification.inc.css | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index d3407aa58100..444c48057faf 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -2886,6 +2886,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. } else if (button2.default) { this._secondaryButton.setAttribute("default", "true"); } + + if (this._primaryButton.hidden) { + this._secondaryButton.setAttribute("alone", "true"); + } else if (this._secondaryButton.hidden) { + this._primaryButton.setAttribute("alone", "true"); + } ]]> diff --git a/toolkit/themes/shared/popupnotification.inc.css b/toolkit/themes/shared/popupnotification.inc.css index 0589a9a705d6..d48c18b1a47e 100644 --- a/toolkit/themes/shared/popupnotification.inc.css +++ b/toolkit/themes/shared/popupnotification.inc.css @@ -78,7 +78,7 @@ color: graytext; } -.popup-notification-button[default] { +.popup-notification-button[default]:not([alone]) { flex: 0 50%; }