mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Bug 1310078 - Implement valueAsNumber and valueAsDate for <input type=datetime-local>
This commit is contained in:
parent
5381ebe25c
commit
344ea39e20
6 changed files with 351 additions and 26 deletions
|
|
@ -1075,11 +1075,7 @@ protected:
|
|||
/**
|
||||
* Returns if valueAsNumber attribute applies for the current type.
|
||||
*/
|
||||
bool DoesValueAsNumberApply() const
|
||||
{
|
||||
// TODO: this is temporary until bug 888331 is fixed.
|
||||
return DoesMinMaxApply() && mType != NS_FORM_INPUT_DATETIME_LOCAL;
|
||||
}
|
||||
bool DoesValueAsNumberApply() const { return DoesMinMaxApply(); }
|
||||
|
||||
/**
|
||||
* Returns if autocomplete attribute applies for the current type.
|
||||
|
|
@ -1287,6 +1283,7 @@ protected:
|
|||
* https://html.spec.whatwg.org/multipage/infrastructure.html#valid-normalised-local-date-and-time-string
|
||||
*/
|
||||
void NormalizeDateTimeLocal(nsAString& aValue) const;
|
||||
|
||||
/**
|
||||
* This methods returns the number of days since epoch for a given year and
|
||||
* week.
|
||||
|
|
@ -1317,6 +1314,13 @@ protected:
|
|||
*/
|
||||
uint32_t MaximumWeekInYear(uint32_t aYear) const;
|
||||
|
||||
/**
|
||||
* This method converts aValue (milliseconds within a day) to hours, minutes,
|
||||
* seconds and milliseconds.
|
||||
*/
|
||||
bool GetTimeFromMs(double aValue, uint16_t* aHours, uint16_t* aMinutes,
|
||||
uint16_t* aSeconds, uint16_t* aMilliseconds) const;
|
||||
|
||||
/**
|
||||
* This methods returns true if it's a leap year.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue