Bug 1496242 - Part I, Simplify nsIDateTimeInputArea interface r=mconley,smaug
This patch simplifies the nsIDateTimeInputArea interface, implemented by the datetimebox bindings, to a point that is easier to convert it to dispatch events, by doing the following: - hasBadInput() is re-implemented in C++ in nsIDateTimeControlFrame since C++ needs the return value synchronously. - SetValueFromPicker() and SetPickerState() are avoided completed since they are simply called by HTMLInputElement methods exposed to the frame script. They are avoided by having the frame script access the NAC and call the nsIDateTimeInputArea methods directly. - Merge setEditAttribute() and removeEditAttribute() to updateEditAttributes() which takes no arguments, and have the method access the attribute values by reading the values from <input>. This patch is a scaled-down version of the patch proposed in bug 1456833. The event approach is only usable in UA Widget version of datetimebox because there is no way to avoid leaking events to the document without Shadow DOM. Differential Revision: https://phabricator.services.mozilla.com/D9056
This commit is contained in:
@@ -846,8 +846,12 @@ public:
|
||||
* know the current state of the picker or to update the input box on changes.
|
||||
*/
|
||||
void GetDateTimeInputBoxValue(DateTimeValue& aValue);
|
||||
void UpdateDateTimeInputBox(const DateTimeValue& aValue);
|
||||
void SetDateTimePickerState(bool aOpen);
|
||||
|
||||
/*
|
||||
* This allows chrome JavaScript to dispatch event to the inner datetimebox
|
||||
* anonymous element or access nsIDateTimeInputArea implmentation.
|
||||
*/
|
||||
Element* GetDateTimeBoxElement();
|
||||
|
||||
/*
|
||||
* The following functions are called from datetime input box XBL to control
|
||||
|
||||
Reference in New Issue
Block a user