gecko-dev/layout
Timothy Guan-tin Chien 28b5c3416c Bug 1514040 - Dispatch events to hidden datetimebox UA Widget r=smaug
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
2019-01-04 21:53:51 +00:00
..
base Bug 1512048 - Convert tabmodalprompt binding to JSM module r=Gijs 2019-01-04 19:29:34 +00:00
build Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
doc Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
forms Bug 1514040 - Dispatch events to hidden datetimebox UA Widget r=smaug 2019-01-04 21:53:51 +00:00
generic Bug 1512244 - Part 8: Use common path in more cases r=mattwoodrow 2019-01-04 18:33:15 +00:00
inspector Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
ipc Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
mathml Bug 1515556 comment fix-ups for the tree reformat (layout/) r=Ehsan,heycam 2018-12-21 03:07:05 +00:00
media
painting Bug 1512244 - Part 1: Cleanup DescendIntoChild r=mattwoodrow 2019-01-04 18:30:27 +00:00
printing Bug 1517241 - Fix yet another MSVC-only bustage. 2019-01-03 19:34:39 +01:00
reftests Bug 1517682 - Drop layout.css.background-blend-mode.enabled pref. r=heycam 2019-01-04 07:21:32 +00:00
style Bug 1517682 - Drop layout.css.background-blend-mode.enabled pref. r=heycam 2019-01-04 07:21:32 +00:00
svg Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
tables Bug 1515556 comment fix-ups for the tree reformat (layout/) r=Ehsan,heycam 2018-12-21 03:07:05 +00:00
tools Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
xul Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
moz.build