summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLInputElement.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-30 20:33:02 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-30 20:33:02 +0200
commit7f21e9c0cd6ec3178ea38f61c6c64c63fcef36b8 (patch)
tree7cfada263233310d348c90da38338b9903f3c00c /dom/html/HTMLInputElement.cpp
parent9f4779f9231aeb3709c36193d43bde6b16576272 (diff)
downloadUXP-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.cpp9
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");