diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /layout/forms/nsNumberControlFrame.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/forms/nsNumberControlFrame.cpp')
-rw-r--r-- | layout/forms/nsNumberControlFrame.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/layout/forms/nsNumberControlFrame.cpp b/layout/forms/nsNumberControlFrame.cpp index e8ed87c8f3..518ba91e24 100644 --- a/layout/forms/nsNumberControlFrame.cpp +++ b/layout/forms/nsNumberControlFrame.cpp @@ -64,22 +64,29 @@ nsresult nsNumberControlFrame::CreateAnonymousContent( nsTextControlFrame::CreateAnonymousContent(aElements); +#if defined(MOZ_WIDGET_ANDROID) + // We don't want spin buttons on Android + return NS_OK; +#else // The author has elected to hide the spinner by setting this // -moz-appearance. We will reframe if it changes. - if (StyleDisplay()->EffectiveAppearance() != StyleAppearance::Textfield) { - // Create the ::-moz-number-spin-box pseudo-element: - mSpinBox = MakeAnonElement(PseudoStyleType::mozNumberSpinBox); + if (StyleDisplay()->EffectiveAppearance() == StyleAppearance::Textfield) { + return NS_OK; + } - // Create the ::-moz-number-spin-up pseudo-element: - mSpinUp = MakeAnonElement(PseudoStyleType::mozNumberSpinUp, mSpinBox); + // Create the ::-moz-number-spin-box pseudo-element: + mSpinBox = MakeAnonElement(PseudoStyleType::mozNumberSpinBox); - // Create the ::-moz-number-spin-down pseudo-element: - mSpinDown = MakeAnonElement(PseudoStyleType::mozNumberSpinDown, mSpinBox); + // Create the ::-moz-number-spin-up pseudo-element: + mSpinUp = MakeAnonElement(PseudoStyleType::mozNumberSpinUp, mSpinBox); - aElements.AppendElement(mSpinBox); - } + // Create the ::-moz-number-spin-down pseudo-element: + mSpinDown = MakeAnonElement(PseudoStyleType::mozNumberSpinDown, mSpinBox); + + aElements.AppendElement(mSpinBox); return NS_OK; +#endif } /* static */ |