diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-30 20:33:02 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-30 20:33:02 +0200 |
commit | 7f21e9c0cd6ec3178ea38f61c6c64c63fcef36b8 (patch) | |
tree | 7cfada263233310d348c90da38338b9903f3c00c /dom/html/HTMLInputElement.cpp | |
parent | 9f4779f9231aeb3709c36193d43bde6b16576272 (diff) | |
download | UXP-7f21e9c0cd6ec3178ea38f61c6c64c63fcef36b8.tar UXP-7f21e9c0cd6ec3178ea38f61c6c64c63fcef36b8.tar.gz UXP-7f21e9c0cd6ec3178ea38f61c6c64c63fcef36b8.tar.lz UXP-7f21e9c0cd6ec3178ea38f61c6c64c63fcef36b8.tar.xz UXP-7f21e9c0cd6ec3178ea38f61c6c64c63fcef36b8.zip |
Bug 1310080 - Implement the step attribute for <input type=datetime-local>
Diffstat (limited to 'dom/html/HTMLInputElement.cpp')
-rw-r--r-- | dom/html/HTMLInputElement.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp index f1f84a27e..f1a54705e 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -2438,11 +2438,8 @@ HTMLInputElement::GetMaximum() const Decimal HTMLInputElement::GetStepBase() const { - MOZ_ASSERT(mType == NS_FORM_INPUT_NUMBER || - mType == NS_FORM_INPUT_DATE || - mType == NS_FORM_INPUT_TIME || - mType == NS_FORM_INPUT_MONTH || - mType == NS_FORM_INPUT_WEEK || + MOZ_ASSERT(IsDateTimeInputType(mType) || + mType == NS_FORM_INPUT_NUMBER || mType == NS_FORM_INPUT_RANGE, "Check that kDefaultStepBase is correct for this new type"); @@ -8818,6 +8815,7 @@ HTMLInputElement::GetStepScaleFactor() const case NS_FORM_INPUT_RANGE: return kStepScaleFactorNumberRange; case NS_FORM_INPUT_TIME: + case NS_FORM_INPUT_DATETIME_LOCAL: return kStepScaleFactorTime; case NS_FORM_INPUT_MONTH: return kStepScaleFactorMonth; @@ -8842,6 +8840,7 @@ HTMLInputElement::GetDefaultStep() const case NS_FORM_INPUT_RANGE: return kDefaultStep; case NS_FORM_INPUT_TIME: + case NS_FORM_INPUT_DATETIME_LOCAL: return kDefaultStepTime; default: MOZ_ASSERT(false, "Unrecognized input type"); |