зеркало из https://github.com/mozilla/gecko-dev.git
28b5c3416c
The XBL binding implementation relied on nsDateTimeControlFrame to call into its nsIDateTimeInputArea implementation. This is correct because the XBL binding is only constructed when the element has a frame. If the value is set while the element is hidden, the XBL binding will pick up the correct value during construction. That is not the case for UA Widget. As it is constructed when the DOM is attached, relying on nsDateTimeControlFrame to send an event when attributes change means the event won't be sent to the already constructed UA Widget. This patch fixes that by moving the event dispatching calls originating from HTMLInputElement out of nsDateTimeControlFrame, so they will behave correctly in the absence of the frame. I've also moved the gut of nsDateTimeControlFrame::HasBadInput() to DateTimeInputTypeBase::HasBadInput(). Content script should be allowed to validate the input without the frame. Sadly this means the XBL implementation and the UA Widget implementation have further diverged. The complexity should go away when we could finally remove the XBL implementation. nsDateTimeControlFrame still dispatches a few events to UA Widget, in AttributeChanged() and SyncDisabledState(), as they are originated from the layout. The name of the events in AttributeChanged() are incorrect though -- I am correcting that in this patch too. Differential Revision: https://phabricator.services.mozilla.com/D15601 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
base | ||
build | ||
doc | ||
forms | ||
generic | ||
inspector | ||
ipc | ||
mathml | ||
media | ||
painting | ||
printing | ||
reftests | ||
style | ||
svg | ||
tables | ||
tools | ||
xul | ||
moz.build |