Bug 1364026 - (Part 1) Expose HTMLInputElement.getMinimum/getMaximum methods via webidl. r=smaug
MozReview-Commit-ID: 2eU0MX7glng
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -881,16 +881,18 @@ public:
void UpdateValidityState();
/*
* The following are called from datetime input box binding to get the
* corresponding computed values.
*/
double GetStepAsDouble() { return GetStep().toDouble(); }
double GetStepBaseAsDouble() { return GetStepBase().toDouble(); }
+ double GetMinimumAsDouble() { return GetMinimum().toDouble(); }
+ double GetMaximumAsDouble() { return GetMaximum().toDouble(); }
HTMLInputElement* GetOwnerNumberControl();
void StartNumberControlSpinnerSpin();
enum SpinnerStopState {
eAllowDispatchingEvents,
eDisallowDispatchingEvents
};
--- a/dom/webidl/HTMLInputElement.webidl
+++ b/dom/webidl/HTMLInputElement.webidl
@@ -242,16 +242,24 @@ partial interface HTMLInputElement {
DateTimeValue getDateTimeInputBoxValue();
[Pref="dom.forms.datetime", ChromeOnly]
void updateDateTimeInputBox(optional DateTimeValue value);
[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);
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
void updateDateTimePicker(optional DateTimeValue value);
[Pref="dom.forms.datetime", Func="IsChromeOrXBL"]
void closeDateTimePicker();