mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Bug 1310080 - Implement the step attribute for <input type=datetime-local>
This commit is contained in:
parent
1a9f7f4310
commit
a1c4899124
8 changed files with 251 additions and 61 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue