summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLInputElement.h
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-30 19:11:11 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-30 19:11:11 +0200
commita77308735f50fb1735bca82ffd0ffaf12a5c9f62 (patch)
treeabc268c77f5a1938a65ee533b1da6b7d6393ee73 /dom/html/HTMLInputElement.h
parentc4aadf04aa9c089c6251478f23e941bfa03b3cad (diff)
downloadUXP-a77308735f50fb1735bca82ffd0ffaf12a5c9f62.tar
UXP-a77308735f50fb1735bca82ffd0ffaf12a5c9f62.tar.gz
UXP-a77308735f50fb1735bca82ffd0ffaf12a5c9f62.tar.lz
UXP-a77308735f50fb1735bca82ffd0ffaf12a5c9f62.tar.xz
UXP-a77308735f50fb1735bca82ffd0ffaf12a5c9f62.zip
Bug 1310078 - Implement valueAsNumber and valueAsDate for <input type=datetime-local>
Diffstat (limited to 'dom/html/HTMLInputElement.h')
-rw-r--r--dom/html/HTMLInputElement.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/dom/html/HTMLInputElement.h b/dom/html/HTMLInputElement.h
index 9baaffb63..56f40a60a 100644
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -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.
@@ -1318,6 +1315,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.
*/
bool IsLeapYear(uint32_t aYear) const;