diff options
Diffstat (limited to 'dom/html/HTMLInputElement.h')
-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. |