Get specs updated to new dictionary defaulting setup
Closed this issue · 25 comments
Followup to #750 that probably needs to wait for plinss/widlparser#39 and speced/bikeshed#1491 to be fixed.
To-be-triaged list of things that might need updating, based on Gecko's IDL that needed to be changed:
- CSS -- w3c/csswg-drafts#4234
- https://drafts.csswg.org/web-animations/
- Animatable
- AnimationEffect
- AnimationPlaybackEvent
- DocumentTimeline
- KeyframeEffect
- AnimationEvent -- https://drafts.csswg.org/css-animations-1/
- https://drafts.csswg.org/cssom-view/
- Element
- GeometryUtils
- MediaQueryListEvent
- https://drafts.csswg.org/css-font-loading/
- FontFaceSetLoadEvent
- FontFace
- ResizeObserver -- https://drafts.csswg.org/resize-observer/
- https://drafts.csswg.org/web-animations/
- https://webaudio.github.io/web-audio-api/ -- WebAudio/web-audio-api#1989
- AnalyserNode
- AudioBufferSourceNode
- AudioContext
- AudioWorkletNode
- AudioWorkletProcessor
- BaseAudioContext
- BiquadFilterNode
- ChannelSplitterNode
- ChannelMergerNode
- ConstantSourceNode
- ConvolverNode
- DelayNode
- DynamicsCompressorNode
- GainNode
- MediaStreamAudioDestinationNode
- OscillatorNode
- PannerNode
- PeriodicWave
- StereoPannerNode
- WaveShaperNode
- https://w3c.github.io/ServiceWorker/ -- w3c/ServiceWorker#1448
- CacheStorage
- Cache
- Clients
- Client
- ExtendableEvent
- ExtendableMessageEvent
- ServiceWorkerContainer
- ServiceWorker
- BlobEvent -- https://w3c.github.io/mediacapture-record/
- https://w3c.github.io/FileAPI/ -- w3c/FileAPI#134
- File
- Blob
- https://html.spec.whatwg.org/ - whatwg/html#4745
- CanvasRenderingContext2D
- CloseEvent
- CustomElementRegistry
- DedicatedWorkerGlobalScope
- DragEvent
- Element
- ErrorEvent
- EventSource
- HashChangeEvent
- HTMLSlotElement
- MessageEvent
- MessagePort
- PageTransitionEvent
- PopStateEvent
- SharedWorker
- StorageEvent
- TrackEvent
- WindowOrWorkerGlobalScope
- Window
- Worker
- ClipboardEvent -- https://w3c.github.io/clipboard-apis/ -- w3c/clipboard-apis#91
- https://w3c.github.io/uievents/ -- w3c/uievents#239
- CompositionEvent
- FocusEvent
- InputEvent
- KeyboardEvent
- MouseEvent
- UIEvent
- WheelEvent
- CredentialManagement -- w3c/webappsec-credential-management#140
- https://dom.spec.whatwg.org/ -- whatwg/dom#771
- CustomEvent
- Document
- EventTarget
- Event
- MutationObserver
- Node
- https://w3c.github.io/deviceorientation/ -- w3c/deviceorientation#78
- DeviceMotionEvent
- DeviceOrientationEvent
- DeviceLightEvent -- w3c/ambient-light#58
- https://drafts.fxtf.org/geometry/ -- w3c/fxtf-drafts#356
- DOMMatrix
- DOMPoint
- DOMQuad
- DOMRect
- FileSystemDirectoryEntry -- https://wicg.github.io/entries-api/ -- WICG/entries-api#31
- GamepadEvent -- w3c/gamepad#101
- Geolocation -- https://www.w3.org/TR/geolocation-API/ -- w3c/geolocation#27
- https://w3c.github.io/IndexedDB/ -- w3c/IndexedDB#285
- IDBDatabase
- IDBObjectStore
- IDBVersionChangeEvent
- ImageCaptureErrorEvent -- w3c/mediacapture-image#214
- IntersectionObserver -- w3c/IntersectionObserver#374
- w3c/mediacapture-main#613
- MediaDevices
- MediaStreamTrack
- MediaEncryptedEvent -- w3c/encrypted-media#452
- MediaRecorder -- w3c/mediacapture-record#180
- MediaStreamEvent -- no longer specified?
- WebAudio/web-midi-api#203
- MIDIConnectionEvent
- MIDIMessageEvent
- Navigator.requestMIDIAccess
- Navigator.share -- w3c/web-share#111
- https://notifications.spec.whatwg.org/ - whatwg/notifications#149
- Notification
- ServiceWorkerRegistration
- Payment Request -- w3c/payment-request#874
- MerchantValidationEvent
- PaymentMethodChangeEvent
- PaymentRequestUpdateEvent
- PaymentRequest
- PaymentResponse
- Performance -- w3c/user-timing#65
- PerformanceObserverEntryList -- w3c/performance-timeline#61
- PerformanceObserver -- w3c/performance-timeline#147
- PointerEvent -- w3c/pointerevents#296
- ProximitySensor -- w3c/proximity#40
- Push w3c/push-api#308
- PushEvent
- PushManager
- PushSubscription
- Reporting -- w3c/reporting#172
- https://fetch.spec.whatwg.org/ - whatwg/fetch#919
- Request
- Response
- w3c/webrtc-pc#2277
- RTCDTMFToneChangeEvent
- RTCIceCandidate
- RTCPeerConnectionIceEvent
- RTCPeerConnection
- RTCSessionDescription
- SecurityPolicyViolationEvent -- w3c/webappsec-csp#408
- WICG/speech-api#60
- SpeechRecognitionErrorEvent
- SpeechRecognitionEvent
- w3c/svgwg#727
- SVGGeometryElement
- SVGGraphicsElement
- SVGTextContentElement
- TextDecoder -- https://encoding.spec.whatwg.org/ - whatwg/encoding#181
- TouchEvent -- w3c/touch-events#104
- TransitionEvent -- w3c/csswg-drafts#4232
- WebGLContextEvent
- WebGPU -- gpuweb/gpuweb#420
- Worklet -- w3c/css-houdini-drafts#937
- https://xhr.spec.whatwg.org/ - whatwg/xhr#250
- ProgressEvent
I can help with the WebApps WG specs and Payments WG spec and get them republished.
ReSpec will emit warnings for this too. We might also implement an “auto fix” for this in ReSpec, so at least Editors drafts will produce the right IDL.
@marcoscaceres Thanks! I'll keep triaging the list above as I have time, and trying to get issues filed.
Once bikeshed is ready, I can take the IndexedDB and entries-api ones.
In the above checklist, MediaStreamAudioDestinationNode, OscillatorNode, PannerNode, StereoPannerNode, WaveShaperNode, PeriodicWave should be added to the webaudio batch.
Presumably the UDP* and TCP* ones are Firefox OS residue?
Also, IDBFileHandle is non-standard, it's a Gecko thing. Similarly, there is no standard IDBFactory method that takes a dictionary - that's a nonstandard Gecko extension.
Filed w3c/IndexedDB#285 and WICG/entries-api#31
should be added to the webaudio batch
Done, thanks. Hadn't gotten to those yet. ;)
Presumably the UDP* and TCP* ones are Firefox OS residue?
They started out with Firefox OS, but at this point it looks like Firefox devtools use them (e.g. for adb connection). More pertinently, https://www.w3.org/2012/sysapps/tcp-udp-sockets/ is a thing, but doesn't seem to contain any actual IDL, though https://www.w3.org/TR/tcp-udp-sockets/ does. Not sure whether it's worth trying to get that updated; it seems pretty dead at the moment... I'll take all the TCP* and UDP* bits out of the list for now.
Also, IDBFileHandle is non-standard, it's a Gecko thing
Yep, I just dropped all the IDB things in without checking carefully, since the IDB spec needs some updates... I'll remove it from the list.
Similarly, there is no standard IDBFactory method that takes a dictionary - that's a nonstandard Gecko extension.
Removed from list, thanks.
There are likely more Gecko-specific things in the untriaged list; I removed some obvious ones as a first pass, but as you found there's more there...
Thank you for filing the IDB and entries-api issues!
Sent w3c/payment-request#874 for Payment Request:
You can ✓:
- PaymentMethodChangeEvent
- PaymentRequestUpdateEvent
- PaymentRequest
- PaymentResponse
- MerchantValidationEvent
Sent w3c/FileAPI#134 for File API, which covers:
- File
- Blob
Sent w3c/ServiceWorker#1448 for ServiceWorker, which covers:
- ServiceWorker
- ServiceWorkerContainer
- Client
- Clients
- ExtendableEvent
- ExtendableMessageEvent
- Cache
- CacheStorage
Sent w3c/push-api#308 for Push, which covers:
- PushEvent
- PushManager
- PushSubscription
Sent w3c/clipboard-apis#91 for Clipboard APIs, which covers:
- ClipboardEvent
Cc @anssiko... there are a few above from your WGs. Could use your help 🙏
Sent w3c/IntersectionObserver#374 for IntersectionObserver, which covers:
- IntersectionObserver
Sent w3c/uievents#239 for UIEvents, which covers:
- UIEvent
- FocusEvent
- MouseEvent
- WheelEvent
- InputEvent
- KeyboardEvent
- CompositionEvent
Note above... InputEvent
is defined in UIEvents, not in https://w3c.github.io/input-events/, where it's a partial interface.
Sent WebAudio/web-midi-api#203 for Web Midi, which covers:
- MIDIConnectionEvent
- MIDIMessageEvent
@yoavweiss a few here from the Perf WG:
- PerformanceEntryEvent
- PerformanceObserverEntryList
- PerformanceObserver
If you let me know the specs, I can send some PRs.
All WHATWG standards have a PR at this point.
PRs submitted for w3c/deviceorientation#78 and w3c/geolocation#27. DeviceProximityEvent, UserProximityEvent, and DeviceLightEvent are deprecated and superseded by ProximitySensor and AmbientLightSensor that were affected and received a similar PR treatment.
In addition, I created PRs for specs that extend Generic Sensor API, also affected.
Everything except WebGL should be filed now; I also removed the Mozilla-internal APIs.
Awesome! How did you feel about this process? In particular, how painful was it, and how does that make us feel about changes like #700, or other more speculative ideas people have thrown around?
My main takeaway is that it'd be great to have all tooling PRs ready as well so we only need to communicate a change to everyone once. So that at the point it's communicated everyone can pick it up straight away.
Second that, the list was helpful.
Related to tooling, and hopefully not too much OT, do we have a tool to conveniently diff spec IDLs against major browsers' implementations to make communicating (proposed) spec changes not just toward downstream specs but also toward implementations easier?
There's https://github.com/mdittmer/web-apis and https://github.com/tidoust/reffy so parts of the problem have already been solved. @foolip @tidoust?
@anssiko a part of https://github.com/mdittmer/web-apis was indeed directed towards this problem, and @mdittmer did in fact produce lists of discrepancies in various categories. We used these lists to file a lot of bugs tracked by https://crbug.com/674593. You can see a lot have been resolved, so the approach worked!
However, we didn't keep triaging differences over time or build tooling to prevent differences from occurring in the first place.
The biggest hurdle, which isn't a very big one, is having a Web IDL parser able to parse both all spec IDL (webidl2.js) but also all the IDL from Chromium, Gecko and WebKit. https://github.com/mdittmer/webidl2-js (not the same as webidl2.js) was once able to do that, but such a parser has to be continuously maintained to keep up with changes.
So to summarize, such tooling isn't deployed, but it's been done before, and the technical challenges are pretty modest. It's mostly a matter of time investment vs. payoff, and web-platform-tests took priority for us.
@lukebjerring FYI about this history and potential area of work.
I'm closing this. There's one or two specs still not updated, but by-and-large this has been embraced and tooling will eventually get the laggards updated as well.