summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-30 21:13:59 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-30 21:13:59 +0200
commit5e69b904229a13b423b6a2a1f3be4c50ffd2c505 (patch)
tree2202a4eb6edeae3807b8f835f178f4a28a9b1e25
parent6f1fcab2d81caedd96d9404386bc92f9884c30ce (diff)
downloadUXP-5e69b904229a13b423b6a2a1f3be4c50ffd2c505.tar
UXP-5e69b904229a13b423b6a2a1f3be4c50ffd2c505.tar.gz
UXP-5e69b904229a13b423b6a2a1f3be4c50ffd2c505.tar.lz
UXP-5e69b904229a13b423b6a2a1f3be4c50ffd2c505.tar.xz
UXP-5e69b904229a13b423b6a2a1f3be4c50ffd2c505.zip
Bug 1364026 - (Part 1) Expose HTMLInputElement.getMinimum/getMaximum methods via webidl
-rw-r--r--dom/html/HTMLInputElement.h7
-rw-r--r--dom/webidl/HTMLInputElement.webidl8
2 files changed, 15 insertions, 0 deletions
diff --git a/dom/html/HTMLInputElement.h b/dom/html/HTMLInputElement.h
index fde12b817..2321b7338 100644
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -796,6 +796,13 @@ public:
void UpdateDateTimePicker(const DateTimeValue& aValue);
void CloseDateTimePicker();
+ /*
+ * The following are called from datetime input box binding to get the
+ * corresponding computed values.
+ */
+ double GetMinimumAsDouble() { return GetMinimum().toDouble(); }
+ double GetMaximumAsDouble() { return GetMaximum().toDouble(); }
+
HTMLInputElement* GetOwnerNumberControl();
HTMLInputElement* GetOwnerDateTimeControl();
diff --git a/dom/webidl/HTMLInputElement.webidl b/dom/webidl/HTMLInputElement.webidl
index b2546fcca..c551d96ab 100644
--- a/dom/webidl/HTMLInputElement.webidl
+++ b/dom/webidl/HTMLInputElement.webidl
@@ -253,6 +253,14 @@ partial interface HTMLInputElement {
[Pref="dom.forms.datetime", ChromeOnly]
void setDateTimePickerState(boolean open);
+ [Pref="dom.forms.datetime", ChromeOnly,
+ BinaryName="getMinimumAsDouble"]
+ double getMinimum();
+
+ [Pref="dom.forms.datetime", ChromeOnly,
+ BinaryName="getMaximumAsDouble"]
+ double getMaximum();
+
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
void openDateTimePicker(optional DateTimeValue initialValue);