gecko-dev/dom
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
..
abort Bug 1508988 - Enable ESLint for dom/abort/, dom/asmjscache/, dom/battery/, dom/broadcastchannel/ and dom/console/ (manual changes). r=Standard8,nika 2018-12-19 22:39:34 +00:00
animation Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
asmjscache Bug 1508988 - Enable ESLint for dom/abort/, dom/asmjscache/, dom/battery/, dom/broadcastchannel/ and dom/console/ (manual changes). r=Standard8,nika 2018-12-19 22:39:34 +00:00
audiochannel Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
base Bug 1517821 - Add a mochitest for bug 1513232. r=kats 2019-01-04 20:16:35 +00:00
battery Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
bindings Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-04 01:03:06 +02:00
broadcastchannel Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
browser-element Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky 2019-01-02 13:27:05 +00:00
cache Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
canvas Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
chrome-webidl Backed out changeset dbea03a5c55e (bug 1497146) for bmsvc bustages on SessionStoreUtils. 2019-01-04 19:37:37 +02:00
clients Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
commandhandler Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
console Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
credentialmanagement Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
crypto Bug 1508825 - Enable ESLint for dom/crypto (manual changes) r=Standard8,Ehsan 2018-12-14 22:54:56 +00:00
encoding Bug 1514726 - Avoid an allocation and copy in TextEncoder.encode() in the non-ASCII case. r=m_kato 2018-12-18 11:40:31 +00:00
events Merge mozilla-central to mozilla-inbound. 2019-01-04 11:46:43 +02:00
fetch Bug 1517448 - Set PrincipalInfo for Request and Response objects, r=smaug 2019-01-03 19:24:30 +01:00
file Bug 1517696 - Better exposing of blobImplType for StreamBlobImpl, r=smaug 2019-01-04 11:29:48 +01:00
filehandle Bug 1515437 - mark several IPC methods as final; r=froydnj 2018-12-19 21:46:49 +00:00
filesystem Bug 1515616 - Fix various DOM tests to use nsIFile.NORMAL_FILE_TYPE rather than the unknown nsIFile.FILE_TYPE. r=smaug 2018-12-20 18:17:22 +00:00
flex Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
gamepad Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
geolocation Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
grid Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
html Bug 1514040 - Dispatch events to hidden datetimebox UA Widget r=smaug 2019-01-04 21:53:51 +00:00
imptests
indexedDB Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
interfaces Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
ipc Bug 1513876 - Add missing commas. r=eslint-fix 2019-01-04 13:07:29 +02:00
jsurl Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
locales Bug 1510223 - Warn about scripts with wrong MIME type. r=ckerschb,nchevobbe 2019-01-03 08:58:48 +00:00
localstorage Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
manifest Bug 1508991 - Enable ESLint for dom/manifest/ (manual changes) r=Standard8,Ehsan 2018-12-18 20:39:42 +00:00
mathml Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
media Bug 1515471 - Add gtest for mp4 sample description entry lookup. r=jya 2019-01-04 17:57:18 +00:00
messagechannel Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
midi Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
network Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
notification Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
offline Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
payments Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
performance Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
permission Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
plugins Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
power Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
presentation Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
prio Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
promise Bug 1515590 part 3 - Fix some debugger tests by forcing separate compartments for the debugger and debuggee. r=ochameau 2018-12-22 21:39:56 +00:00
push Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop 2018-12-11 13:15:08 +00:00
quota Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
reporting Bug 1511666 - Disable test_delivering.html on android debug for frequent failures. r=jmaher 2018-12-11 01:16:00 +02:00
res
script Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
security Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-04 01:03:06 +02:00
serviceworkers Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
simpledb Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
smil Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
storage Bug 1516023 - Remove LocalStorage::mPrincipal because unused, r=asuth 2019-01-04 00:12:22 +01:00
svg Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
system Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
tests Bug 1512048 - Convert tabmodalprompt binding to JSM module r=Gijs 2019-01-04 19:29:34 +00:00
u2f Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
url Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
vr Bug 1508225 - Change return type of VRDisplayExternal::GetSensorState to a reference r=kip,dmajor 2018-12-18 19:39:44 +00:00
webauthn Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
webbrowserpersist Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
webgpu Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop 2018-12-11 13:15:08 +00:00
webidl Bug 1425685 - Implement HTMLSlotElement.assignedElements(); r=smaug 2019-01-03 19:14:12 +00:00
websocket Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
workers Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-04 01:03:06 +02:00
worklet Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
xbl Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
xhr Bug 1517696 - Better exposing of blobImplType for StreamBlobImpl, r=smaug 2019-01-04 11:29:48 +01:00
xml Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
xslt 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
jar.mn
moz.build Bug 1286798 - Part 3: New basic (memory only) implementation of LocalStorage; r=asuth,mccr8 2018-11-29 21:47:20 +01:00