summaryrefslogtreecommitdiffstats
path: root/layout/forms/nsTextControlFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/forms/nsTextControlFrame.cpp')
-rw-r--r--layout/forms/nsTextControlFrame.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp
index 32e817be8a..3c44038d89 100644
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -417,8 +417,10 @@ nsresult nsTextControlFrame::CreateAnonymousContent(
// background on the placeholder doesn't obscure the caret.
aElements.AppendElement(mRootNode);
- if (StaticPrefs::layout_forms_reveal_password_button_enabled() &&
- IsPasswordTextControl()) {
+ if ((StaticPrefs::layout_forms_reveal_password_button_enabled() ||
+ PresContext()->Document()->ChromeRulesEnabled()) &&
+ IsPasswordTextControl() &&
+ StyleDisplay()->EffectiveAppearance() != StyleAppearance::Textfield) {
mRevealButton =
MakeAnonElement(PseudoStyleType::mozReveal, nullptr, nsGkAtoms::button);
mRevealButton->SetAttr(kNameSpaceID_None, nsGkAtoms::aria_hidden,