diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /dom/html/HTMLInputElement.h | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dom/html/HTMLInputElement.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/dom/html/HTMLInputElement.h b/dom/html/HTMLInputElement.h index 2c90aa83fe..aa8bff8864 100644 --- a/dom/html/HTMLInputElement.h +++ b/dom/html/HTMLInputElement.h @@ -162,7 +162,7 @@ class HTMLInputElement final : public TextControlElement, void FieldSetDisabledChanged(bool aNotify) override; // nsIContent - bool IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable, + bool IsHTMLFocusable(IsFocusableFlags, bool* aIsFocusable, int32_t* aTabIndex) override; bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute, @@ -663,9 +663,8 @@ class HTMLInputElement final : public TextControlElement, SetUnsignedIntAttr(nsGkAtoms::width, aValue, 0, aRv); } - void StepUp(int32_t aN, ErrorResult& aRv) { aRv = ApplyStep(aN); } - - void StepDown(int32_t aN, ErrorResult& aRv) { aRv = ApplyStep(-aN); } + void StepUp(int32_t aN, ErrorResult& aRv) { ApplyStep(aN, aRv); } + void StepDown(int32_t aN, ErrorResult& aRv) { ApplyStep(-aN, aRv); } /** * Returns the current step value. @@ -1311,22 +1310,17 @@ class HTMLInputElement final : public TextControlElement, */ Decimal GetDefaultStep() const; - enum StepCallerType { CALLED_FOR_USER_EVENT, CALLED_FOR_SCRIPT }; + enum class StepCallerType { ForUserEvent, ForScript }; /** - * Sets the aValue outparam to the value that this input would take if - * someone tries to step aStep steps and this input's value would change as - * a result. Leaves aValue untouched if this inputs value would not change - * (e.g. already at max, and asking for the next step up). + * Returns the value that this input would take if someone tries to step + * aStepCount steps and this input's value would change as a result, or + * Decimal::nan() otherwise (e.g., if this inputs value would not change due + * to it being already at max, and asking for the next step up). * * Negative aStep means step down, positive means step up. - * - * Returns NS_OK or else the error values that should be thrown if this call - * was initiated by a stepUp()/stepDown() call from script under conditions - * that such a call should throw. */ - nsresult GetValueIfStepped(int32_t aStepCount, StepCallerType aCallerType, - Decimal* aNextStep); + Decimal GetValueIfStepped(int32_t aStepCount, StepCallerType, ErrorResult&); /** * Apply a step change from stepUp or stepDown by multiplying aStep by the @@ -1334,7 +1328,7 @@ class HTMLInputElement final : public TextControlElement, * * @param aStep The value used to be multiplied against the step value. */ - nsresult ApplyStep(int32_t aStep); + void ApplyStep(int32_t aStep, ErrorResult&); /** * Returns if the current type is an experimental mobile type. |